In my eternal quest to find new ways to view physics simulations I found a blog on cyber-omelette (linked below), by Ben Eagen which details the basics of Newtonian gravity, and how to plot a simple solar system in python. In his article, Eagen does an incredible job of breaking down the basics of the classical interpretation of gravity, a radial force that pulls two massive bodies together. His code utilizes the Euler method of approximation, which calculates the position of the planets in the solar system by examining the simultaneous changes of position of each of the bodies with incredibly small steps in time, and the resultant acceleration due to gravity, in order to attain an accurate orbital path.
I recently watched a youtube video by Clément Mihailescu on the topic of Pathfinding algorithms, and I have been fascinated by them ever since. His video was a tutorial on how to create a pathfinding visualization software which I followed along with, and had a lot of fun playing around with afterwards. In the video he demonstrates how to create a visualization of Dijkstra’s algorithm, which in this case finds the shortest path by assigning an integer value to nearby nodes to a starting node, and upon reaching the finish node, determines the shortest path based on those integer values. It essentially searches every single possible route until it reaches the finish. Though this was able to complete the simple goal of finding the shortest path to the destination, what if we wanted to find something faster?
Within the realm of react, the state of a component manipulates how a specific component acts and is rendered for a user to interact with. State, as opposed to props, can be altered within the respective component containing that state. For example, it can be updated in three ways: event handlers, server responses, and prop changes. React gives us a handy function which provides a means of changing the state of the component, while also rerendering the page in the setState() function. This function asynchronously allows a user to make changes in state that quickly render on the page, rather than setting the state directly where the same thing would not be possible. The function this.setState() takes in an object, containing a literal change to the state which is then merged with the current state. For example, in my latest React/Redux portfolio project, an upvote component was added, which upon clicking a button would change the state of the total upvotes to one more than the current value. To do this I added an event handler that would be triggered on click that looked as follows
Five months ago, before my course at Flatiron had begun, I had no previous coding knowledge. I did not know entirely what to expect from the program, however to think that I would be able to create an app using this strange framework called “react” in just a couple of days would have seemed entirely outlandish. However, now equipped with the knowledge that I have accrued of React and Redux, I have finally reached the end of my journey at Flatiron school with my project Track Notes.
For my JavaScript and Rails final project, I decided to try to tackle and find a solution for an issue that had plagued my college career: having to write down new equation sheets for every single test that I took. Having to go through and locate every equation to write down from a textbook, and find a way to fit it all onto one sheet of paper was often a nightmare. So for my project, I decided to work on a web application that would do the hard work for me. The idea was that there would be a list of different fields of study, and within those fields you would have a list of equations, and the ability to add or remove from the equations as you see fit. Though this was my original idea, the time constraints, and the numerous attempts to try to get LaTeX implemented in the project, I ended up making a simpler application which just takes in a user inputted equation and inserts it into a sheet under the equation sheet header. Some of the challenges of building this project were my own constraints of having only worked in JavaScript for a few weeks, and doing about a week of JavaScript and Rails work in total before this. Initially, understanding how all of the relationships worked, and how information was meant to travel from the rails backend to the javascript frontend were incredibly confusing. However through actually working on the project myself I found that it was actually a lot simpler than I made it out to be in my head. Through simple fetch requests, you are able to take the information stored in the rails backend, and convert it into JSON. That JSON is then able to be manipulated by the javascript written in the front end. I still want to continue to work on this project, and expand it to where it meets the original vision that I had in mind, however for a start I feel like it was a great learning experience.