Recently a Twitter user posted a project they had been working on where they implemented a multi-dimensional array to store frames of a movie. They used the variable int ****video to store this data, and were immediately mocked by software Twitter. This is definitely the wrong way to do multi-dimensional arrays, but I’ve also seen material, even textbooks, that incorrectly teach it this way. I can easily imagine the above-mentioned Twitter user was simply taught wrong. (In fact, I think it’s very likely.) So today I want to talk about the correct way to do multi-dimensional, dynamically sized arrays
how things work
Astrophysics / Physics / Relativity / etc.
The Geodetic Effect: Measuring the Curvature of Spacetime
A couple of weeks ago, I described the so-called “classical tests of general relativity,” which were tests of early predictions of the theory. This week, I want to tell you about a much more modern, difficult, and convincing test: A direct measurement of the curvature of spacetime. It’s called the geodetic effect. This is the eighth post in my howgrworks series. Let’s get to it. We know from general relativity that gravity is a distortion of how we measure distance and duration. And that we can interpret this distortion as the curvature of a unified spacetime. When particles travel
Physics / Relativity / Science And Math
Classical Tests of General Relativity
Last Wednesday, November 25, was the 100 year anniversary of general relativity. It was the precise day that Einstein presented his field equations, shown in figure 1, to the world. In celebration of this anniversary, today I present to you some of the early triumphs of general relativity, classical predictions of the theory that have been precisely tested and where theory has exquisitely matched experiment. This is the sixth instalment of my howgrworks series. Let’s get started. The Perihelion of Mercury Before Einstein, we believed that the motion of planets in the solar system were governed by Kepler’s laws
Geometry / Physics / Relativity / etc.
In-Falling Geodesics in Our Local Spacetime
My previous post was a description of the shape of spacetime around the Earth. I framed the discussion by asking what happens when I drop a ball from rest above the surface of the Earth. Spacetime is curved. And the ball takes the straightest possible path through spacetime. So what does that look like? Last time I generated a representation of the spacetime to illustrate. However, I generated some confusion by claiming that it “should be obvious” that the straightest possible path is curved towards or away from the Earth. When a textbook author says “the proof is trivial”
Geometry / Physics / Relativity / etc.
Our Local Spacetime
General relativity tells us that mass (and energy) bend spacetime. And when people visualize the effect of a planet on spacetime, they usually imagine something like in figure 1, where the planet creates a “dip” in spacetime much like a “gravitational well.” But today I’m going to show you what spacetime actually looks like near a planet… and it doesn’t look anything like the common picture. This is the fifth part in my many-part series on general relativity. Here are the first four parts: Galileo almost discovered general relativity General relativity is the dynamics of distance General relativity is
Physics / Relativity / Science And Math
Distance Ripples: How Gravitational Waves Work
Gravitational waves are “ripples in space time” that propagate through it like waves on water. That’s the common story and, for the most part, it’s right. But what does that mean? This is part four in my many-part series on general relativity. The first three parts introduce general relativity from the ground up. You can find them here: Galileo almost discovered general relativity General relativity is the dynamics of distance General relativity is the curvature of spacetime Okay. Without further ado, gravitational waves! Spooky Action at a Distance First, I want to help you get an intuition for why
Geometry / Mathematics / Physics / etc.
General Relativity is the Curvature of Spacetime
Figure 1 shows light from a distant blue galaxy that is distorted into a so-called Einstein ring by the curvature of spacetime around a red galaxy. This is called gravitational lensing and today we’ll learn how it works. This is part three of my many-part series on general relativity. Last time, I told you how general relativity is the dynamics of distance, which we know is a consequence of the fact that gravity is the same as acceleration. This time, I describe the consequences of the fact gravity warps distance. And in the process, we’ll learn precisely why gravity
Physics / Relativity / Science And Math
General Relativity is the Dynamics of Distance
This is part two in a many-part series on general relativity. Last time, I described how Galileo almost discovered general relativity. In particular, I told you that gravity isn’t a force. In fact, gravity is the same as acceleration. Now, this is a completely crazy idea. After all, we’re all sitting in the gravitational field of the Earth right now, but we don’t feel like we’re moving, let alone accelerating. But let’s take this crazy idea at face value and see where it leads us. (Of course, the Earth is spinning, which is an acceleration. And it’s orbiting the sun,
Computer Related / Education / logic / etc.
What Is A Computer, Really?
Look at the picture above. Believe it or not, that person is operating an extremely sophisticated mechanical calculator, capable of generating tables that evaluate functions called “polynomials.” Although a graphing calculator can do that, a pocket calculator certainly can’t. The device above is a mechanical purpose-built computer! This article is the next installment of my series on computing. In the previous parts, we learned about Boolean logic, the language computers think in. We then learned how to implement this logic electronically and, using our newfound understanding of electronics, how to make computer memory so that computers can record results
Computer Related / logic / Mathematics / etc.
The Turing Machine
This is the sixth part in my multi-part series on computing. In the previous parts, we learned about Boolean logic, the language computers think in. We then learned how to implement this logic electronically. And finally, we learned how to make computer memory, so that computers can record results of calculations. Now before we conclude the series, we’re going to take a quick detour into computational theory and the Turing machine. Alan Turing’s Machine of the Mind In 1936, mathematician, WWII codebreaker, and all around awesome guy Alan Turing wanted to investigate a problem in formal logic. Specifically, he