Computer Programming (Sorta)
- A Favorite Hobby
- Escape rooms are puzzles in which a group of people collect clues to solve puzzles to escape a room or set of rooms in a limited amount of time. They are meant to be fun escapes from your day-to-day routine where you can work your brain and problem-solving skills. Each escape room has a theme to the room, which influences the puzzles and decorations.
Work Consulted: "Escape room" Wikipedia, Wikimedia Foundation, 15 Mar. 2024, https://en.wikipedia.org/wiki/Escape_room.
- This seems like a weird concept for programming, but hear me out for just a minute here.
- 2 Definitions
- Our brain is an organ that controls every aspect of our body. Motor functions, our behaviors, and emotions, memory, our senses. The brain does all of this through both chemical and electrical signals received from the body. It’s made up of different parts, the cerebrum, the stem, and the cerebellum, and it runs sets of instructions like breathing, walking, talking, and thinking as examples.
Work Cited (paraphrased): “Brain Anatomy and How the Brain Works.” Johns Hopkins Medicine, 14 July 2021, www.hopkinsmedicine.org/health/conditions-and-diseases/anatomy-of-the-brain#:~:text=How%20does%20the%20brain%20work,others%20make%20you%20feel%20pain.
- Computers are electronic devices that store, retrieve, and process data. Those processes are done through electrical signals sent from each part of the computer. Computers have both hardware and software. Hardware is the physical parts, the motherboard, the CPU, and RAM, and software is sets of instructions, like web browsers and games as examples.
Work Cited (paraphrased): “Computer Basics: What Is a Computer?” GCFGlobal.Org, GCFGlobal Learning, edu.gcfglobal.org/en/computerbasics/what-is-a-computer/1/.
- The Connection
- Programming is the process of giving computers instructions to solve problems. The way we program today is with basic words and phrases such as IF, While, Else, Not, Or, And, Call, among others. But computers read these instructions as 1’s and 0’s. Everything you do on a device, from a computer to something thought of as more mechanical like a car or a defibrillator, is programmed. Websites you visit, the information and sensors your car gives feedback on, and the control of voltage with safety switches on defibrillators. It’s all programmed. But what if I told you that our brains are effectively like these devices. Our brain is a computer. Our brain is our car’s control center, and our brain is the safety feature that sets our defibrillator to run. Let me explain using 2 examples, If statements and While loops.
Work Cited (Paraphrased): “What Is Programming? And How to Get Started.” Coursera, 29 Mar. 2024, www.coursera.org/articles/what-is-programming.
- Time For Some Headaches
- In programming, there are snippets of code that perform logical operations and loop your work. The If statement lets you create logic to perform tasks depending on a condition. Much like with English, If something, then I do something, else I don’t do that something. If I have an apple, then I eat the apple, else I don’t eat an apple. If that was typed out in Java, it would look like this:
If (apple == true) { eat.apple; }
- Eat.apple would be a method that eats the apple, thus ending the statement.
- The While loop is a block of code that repeats until a condition is met. Much like with English, While I don’t have something, do something until I have that something. While I don’t have an apple, look for an apple until I find an apple. If that was typed out in Java, it would look like this:
While (apple == false) { find.apple; }
- Find.apple would be a method that turns apple true once it’s found, thus ending the loop.
- So why am I talking about programming? No, it’s not because I’ve programmed for the past 8 years of my life. It’s because our minds, our internal escape rooms, are just large snippets of code. Let's say we have to help our mind escape from the stress of work. While (work == true) we want to do our work. But If (work == too hard), then we need to find alternatives. Whether that’s finding other people to help us, researching and learning on our own, or brute forcing our way to the answer. Else we fail, and work is still true as we still have work. But if we’re able to find the solution to each problem we face in our lives, then eventually, work == false, and the loop ends, giving us time to rest. Escape rooms work the same way. While the puzzles are unsolved, you need to find the solutions. If one method doesn’t work, try another, else if no methods seem to work, ask for a hint. Else you fail. I’ve just described the same process of problem-solving that we do during our day-to-day lives comparatively to that of doing an escape room.
Work Consulted: “What Is an IF Statement?” Computer Hope, 9 Apr. 2024, www.computerhope.com/jargon/i/ifstatme.htm.
Work Consulted: Germain, H. James de St. “The ‘While’ Loop.” Programming - While Loop, users.cs.utah.edu/~germain/PPS/Topics/while_loops.html#:~:text=The%20%22While%22%20Loop,until%20a%20condition%20is%20met.
Work Consulted: “Java While Loop.” Java While Loop, W3schools, www.w3schools.com/java/java_while_loop.asp.
Work Consulted: “Java If... Else.” Java IF ... Else, W3schools, www.w3schools.com/java/java_conditions.asp.
Your Choice Of The Next Path To Follow
Your last stop for normalcy: Next Page