Author: Nathan Nguyen

  • HackMITea: A Hackathon From the Eyes of a Physics Major

    Recently, I’ve had the opportunity to visit a friend up north and experience my first ever hackathon, hosted by none other than MIT. Every year, undergraduate students from all over the world gather to Cambridge to attend this student-run event. The goal of a hackathon is to get as far as possible in realizing an innovative project that aligns with an overall theme. For HackMIT, we had 24 hours to design a tech-based project focused one of four areas: sustainability, education, health and accessibility, and interactive media. In working on my project, I developed my coding skills a bit while getting to witness firsthand what life is like for both a CS major and an MIT student.

    This piece is called Alchemy, and it was my favorite statue at MIT

    The Opening Ceremony

    On the day of the competition, we all gathered in a huge gymnasium for the opening ceremony. I was immediately blown away by the sheer number of competitors lining the bleachers in preparation for the our guest speaker, Ali Partovi, to kickoff the hackathon.

    Endless tables of competitors planning out their course of action for the next 24 hours.

    When the ceremony finally began, we were introduced to all the sponsors, and at this point, I gained my first piece of insight into the computer science community. All of the sponsors at the event appeared to be tech-based companies, with some of them, including Partovi, being representatives of mentorship programs designed to facilitate the innovation process for aspiring computer scientists. This along with sponsors ranging from cryptocurrency to health technology painted a picture for me of a community that fostered ambition in achieving goals teetering between wealth and altruism.

    After the sponsors were introduced, Partovi began his speech, which was, interestingly enough, one of the highlights of my time in Cambridge. Apparently an avid Matrix fan, Partovi attempted to kick off his talk by sharing several scenes and quotes from The Matrix, but he was met with technical difficulties, resulting in a few awkward yet entertaining minutes of Partovi adamantly trying to resolve the issues and share with us the masterpiece that is the 1999 original version of The Matrix. Eventually, he succeeded and we were rewarded with a geeky adoration of the classic film, with Partovi confessing that he even named his mentorship company Neo after the movie’s main character. Partovi highlights a conversation between two characters in the film that discusses the idea of not having to “dodge bullets.” And from this, he segues into his main discussion.

    The rest of the speech was centered around Partovi’s experience in the tech industry and about not being afraid of failure, which he calls “bullets.” Though outside of that primary purpose, there were some questionable decisions in his talk. He began by discussing a time when he failed to close a deal with Steve Jobs because he acted dishonestly, which appeared to be a valuable lesson on its own, but he then followed this discussion with a time he lost out on a deal for being too honest. I will leave it to the reader to decide the moral of this story. Afterwards, Partovi took the opportunity to promote his mentorship program Neo and in the process make a comment that later sparked a feud with another mentorship program sponsoring the event.

    The Project

    After the ceremony, my team took a moment to explore the MIT grounds before beginning our project. Within the gymnasium itself, there were sponsors hosting independent coding challenges and offering freebies. I recognized this as a so-called “networking opportunity” that I always hear CS majors talking about. There were also various workshops, including one on how to work with Hugging Face AI models, which was interesting, and one on how to mint NFT’s, which was less interesting.

    Although many groups stayed in the gym, we decided to leave and find a more quiet place on campus to work instead. Our journey led us all throughout MIT, which had a very interesting layout. The entire campus was a vast network of buildings and hallways with an interconnected basement system. One hallway in Building 17 can lead you to Building 22. It was as if the entire school were its own small indoor city. This was not what I expected when I heard the rumor that MIT students don’t go outside. Eventually, our journey led us to the MIT banana room, a room that provides students with an endless supply of bananas as they slave away on their homework assignments or prepare for their next exam. We sat down on some brightly colored bean bags amidst a wall of banana paintings and got to work.

    The banana crates in MIT’s banana room, providing much needed potassium to the students of MIT.

    We chose to work in the interactive media category. Our initial goal was to design a game using a large language model. The premise of the game involves two parties, guessers and pretenders. The guessers would have to choose a prompt for the pretenders to answer, but among the pretenders is an AI that will also respond to the prompt. The goal of the guessers is deduce which response was AI generated, while the pretenders’ goal is to fool the guessers into choosing incorrectly. In challenging the guessers to distinguish an AI from real people, the game highlights how far AI has come in mimicking human speech and thought. On the other hand, pretenders are challenged to “act like an AI” in the sense of thinking on their feet and producing a seeming clear and cogent response according to various prompts.

    Unfortunately, late into our project, we realized that we were too ambitious and would not be able to create a presentable program in time, so we decided to scrap the project in favor of a rhythm game involving hand gestures, aptly titled Hands Dance Revolution. By feeding data of different hand poses to a convolutional neural network, we were able to train the network to identify when those poses were being made on camera. We then used the Pygames library to create a basic game that kept a count of how many times the hand gestures were correctly matched in a given time limit. This game was a basic proof of concept of our actual idea, which would have been a game similar to a hybrid if Just Dance and Dance Dance Revolution in which hands would be positioned and posed to the beat of a song to score points.

    The Conclusion

    The creation of this project required several new skills. Although I had experience in Python with data science, using Python to make games was entirely new to me. My friend spent hours watching countless tutorials on convolutional neural networks. It was not until 6 in the morning that I went to bed for an hour, shortly before it was time to turn in our project. When the moment of truth came, we did not make as much progress as we had wanted, but we at least had a presentable project for the judges.

    The fruits of our labor, the interface of our project. It’s not much, but it’s honest work.

    After the window for projects closed, we had about an hour to prepare for our presentation on our project. During that time, we spoke with other teams, one of which had a project that I particularly liked. They designed an web extension that used an large language model trained on lecture transcripts in order to answer questions for students watching the lecture and redirect them to the appropriate timestamp in which relevant information is discussed.

    When it was time to present our project, I spoke enthusiastically about our game idea and the next steps for our program. However, the judges did not seem too interested in the video game angle. It was not until one of my group members improvised and discussed the potential that our project had in helping people learn sign language or recover motor functions that the judges began to get excited. What I had not realized was that it was not just the project that the judges were assessing but us and our ability to sell our project. Throughout the presenting period, we were given advice by the judges on how we could better market our project and make it seem more appealing to potential investors. Once again, I was reminded that CS majors were very externally motivated and ambitious people.

    A picture of my team with one of the judges. We turned something in, and that is all that matters.

    Unfortunately, we did not make it to the second round of presentations, but this experience is something that I will never forget. Overall, I had fun seeing the sights in Cambridge and immersing myself in something new, but as a physics major interested in becoming a researching professor, I could not match the energy of most of the other competitors, who were more interested in working for big companies and creating startups. However, because of my different interests, the stress of the project was not as bad for me as it seemed for many other people. As an avid seeker of new experiences, I would definitely recommend doing most things at least once. But in particular, attending HackMIT or another hackathon appears to be an excellent way of deciding if the atmosphere of the computer science world is right for you.

  • The Brachistochrone and Snell’s Law: A Surprising Connection

    Brachistochrone – A word originating from Greece that means “shortest time.” The brachistochrone problem is a well known problem in the world of physics that involves finding a curve such that, assuming there is no friction, a ball traveling along this curve would reach its destination in the shortest possible time. Initially discovered by Johann Bernoulli, a famous Swiss mathematician, the brachistochrone curve has a variety of interesting properties, such as the fact that it is a cycloid, the path mapped out by a point on a circle as it rolls on a flat surface. Additionally, a subsection of the curve also acts as a tautochrone curve, a curve that causes a ball to reach its destination in the same amount of time regardless of where it begins its journey. However, perhaps the most interesting fact about the brachistochrone is that it was initially solved by Bernoulli using Snell’s law, a law that dictates the path traveled by light when moving between different mediums.

    A cycloid is mapped out in red. When inverted, this curve matches the shape of the brachistochrone.

    Initially, it may not be readily obvious why Snell’s law would approximate a brachistochrone curve, but with a bit of physical intuition, it makes perfect sense. First, the reason why Snell’s law works must first be understood. Snell’s law states that the ratio of the sines of the angles formed by the refraction of light when passing through a medium is equal to the ratio of the speed within the two media.

    The index of refraction dictates how much light “slows down” in a medium.

    With a bit of calculus not shown here (perhaps in a future article), it can be shown that this equation comes as a consequence of minimizing the time taken for light to travel from one point to another between the two media. This is because light naturally always takes the path of shortest time, and this is what connects Snell’s law to the brachistochrone. When a ball is dropped, it is constantly changing velocity due to gravity, so you can envision a ball as traveling through a continuous set of layers of different velocities. If the ball wanted to travel the path of shortest time, it would follow Snell’s law at every point in its path, so the brachistochrone curve should have the property of having the ratio of instantaneous change in the velocity of the ball match the ratio of the angles formed by a vertical line at that point of the curve.

    Here, the line travels through several “layers” with different speeds due to gravity and diffracts according to Snell’s law each time.

    Of course, it’s one thing to be told that Snell’s law maps out the brachistochrone, but it’s not as satisfying as seeing it for yourself, which is why I coded a simulation in Python to try and match up a curve constructed from Snell’s law with a brachistochrone curve.

    The top two sliders change the initial conditions of the actual brachistochrone in blue, while the bottom two sliders change the initial angle and the number of layers for the Snell’s law approximation in orange.

    For more information on the brachistochrone curve, check out Vsauce or 3Blue1Brown’s videos on the topic below:

     

  • Isaac Newton – One Bad Apple

    Isaac Newton is one of the most well known historical figures in the world of physics, and rightfully so. As the father of classical mechanics, Newton has many discoveries to his name. He was the first falling apple victim to understand the gravity of the situation; he got things moving in classical physics with his laws of motion; he shed some light on the mysteries of, well, light. Many people know him for his vast contributions to our understanding of the natural world, and Newton’s ideas were so significant that he even became president of the Royal Society, a prestigious group of scientists with a strong influence on the European scientific community during his time.

    However, despite all his achievements, Newton was not the best role model. For a man who talks a lot about standing on the shoulders of giants, he sure had a chip on his own. Newton was a vain and vindictive individual who would often take advantage of his influence in order to punish those who got in his way. Today, we’ll be looking at three such cases of famous scientists whose lives were screwed over by the force of just one Newton.

    Victim 1: Robert Hooke

    Perhaps the most famous of Newton’s disputes was his rivalry with Robert Hooke (you may know him from Hooke’s law). The conflict between the two scientists began when Newton was at an early stage in his scientific career. Before Newton rose to power, Hooke was one of the most influential physicists of his time, so when Newton presented his findings to the Royal Society, it was Hooke whom he had to impress.

    One of Newton’s early contributions to science was his theory on the properties of light and how light, Newton thought, consisted of particles. But Hooke and many other physicists at the time were supporters of the wave theory of light, so when Newton shared his ideas with the Royal Society, he was faced with admonishment from Hooke. As one could imagine, Newton did not take criticism lightly, and he held a grudge against Hooke for a long time. Over the years, the two physicists disputed over many things, such as who deserved credit for the concept of gravity, until Hooke’s death in 1703, coincidentally the same year that Isaac Newton became Royal Society president. According to an apocryphal story, Newton even kept his grudge after his rival died and gave orders to have the only painting of Hooke destroyed in an attempt to bury his legacy.

    Note: This portrait was made centuries after Hooke’s death based on historical accounts of his appearance

    Victim 2: Gottfried Wilhelm Leibniz

    Who was the inventor of calculus? If your answer was Newton, you’d be correct. But if you thought it was Gottfried Wilhelm Leibniz, you aren’t wrong either. Today, the general consensus is that these two men both invented calculus on their own, but in the late 17th century, the topic was one of much debate among the scientific community.

    While it is true that Newton invented calculus first, to maintain his reputation as an incredible genius, Newton had a knack for publishing his discoveries while concealing the ways in which he made them. This worked well for Newton until Leibniz independently discovered the same mathematical techniques Newton used to construct his theories and decided to share them with the rest of the world. Of course, when his techniques were no longer secret, Newton wanted all the credit for inventing calculus to himself and began a public dispute over the matter with Leibniz.

    There were supporters on both sides of the debate, but Leibniz never stood a chance against Newton’s unmatched determination. In secret, Newton pumped out article after article in defense of himself and disguised them as writings from his friends, and eventually, the debate boiled down to the decision of the Royal Society, where Newton had the upper hand, of course. As the Society’s president, Newton organized a biased committee to investigate the matter. Ultimately, not only did the committee rule in favor of Newton, but it also accused Leibniz’s work of being derivative (pun very intended) and that Leibniz had plagiarized Newton’s ideas. Even up until his death, Leibniz never got the positive recognition he deserved. But at least today, outside of physics circles, Leibniz’s calculus notation is still the most widely used.

    Victim 3: John Flamsteed

    John Flamsteed, the Astronomer Royal, was another victim of Newton’s vitriol. As head of the Royal Observatory, Flamsteed spent much of his time looking at celestial objects and was known for keeping a meticulous record of his observations. In fact, Newton used Flamsteed’s observational data to help him write his original magnum opus, the Principia Mathematica, in which he described the foundations of classical mechanics. However, between Newton’s publication of the first edition of Principia and his venture into writing the second edition, things became sour between the two scientists. According to Flamsteed, Newton never showed him any signs of appreciation or respect despite his contributions to Newton’s work. He even accused Newton of publishing some of his findings without his permission. As such, Flamsteed was intent on denying Newton access to anymore data for his research.

    However, in classic Newton fashion, in an attempt to obtain the data he needed, he used his authority as president of the Royal Society to forcefully take Flamsteed’s data and have it published by Flamsteed’s biggest rival, Edmond Halley. Luckily, in response, Flamsteed took Newton to court and had Newton’s actions nullified before any damage was done, and out of spite, Newton never acknowledged Flamsteed’s contributions to his theories ever again.

    As you can see, Isaac Newton is a textbook example of why you should never meet your heroes. From framing Leibniz while he was alive to ensuring Hooke was unframed after death, Newton was one bad apple who gave other scientists a headache. And of course, Newton isn’t the only one. With just a little digging, you’d find that physics has quite a few other problematic big shots, and maybe those can be articles for another time. But as they say in the phys-biz, every quark has its quirk (I just made that up, but I hope it’ll catch on). What’s important is separating the physics from the physicist.

    Sources