Ask HN: What is one tech product you still can’t comprehend how it’s built?

9 points by devstein ↗ HN
For me, it’s Google Maps

25 comments

[ 3.5 ms ] story [ 63.8 ms ] thread
Palantir/Foundry
Care to explain?

Palantir was built on the tax payers back for surveilling themselves. Seems pretty straight forward to me?

Recall all the Palantir wearing blokes riding around Pre-Snowden?

Yeah, all those palantir shirts and bags disappeared immediately after Snowden.

this has got to be the dumbest response i've ever seen on HN. congratulations.
chill out. you seem so sure of everything in life that i doubt you'll really hear out other thoughts. enjoy your echo chamber life, cheers.
Second Life
Servers. Permission systems. Users. Payment system. Add all that together and you get content. That content becomes Second Life.
Surely you're talking about the wrong game.

Does Minecraft also boggle your mind?

Google maps? What don't you comprehend about that? Do you remember tripquest and MapQuest back in the day? Modern Google maps is just dynamically loading series of images. An Atlas of images really. A MIP MAP, To make a pun. Those images are associated with coordinates. Get GPS data from user and link it with image and you have where you are. Everything is just linked database information on top of that to provide richness. Stores, location data, parks, etc. Layers and connections.
The real magic of Google maps is that while you're using it, they're aggregating your position with others to make a real time map of traffic, and then aggregating that over time for future predictions as well.

Google maps gets better at predicting traffic as more people use it. This is generally true across mapping services.

MRI and similar scanners

Professional simulation software with finite element methods and the like

The backend of all sorts of networked systems (internet, phone, banking, booking, satellites)

Asteroid/orbital trajectory prediction suites

Relativistic simulations

Multiplayer synchronization and tricks

> Professional simulation software with finite element methods and the like

I learned a little about the theory behind this a decade ago, and how to implement it. For a simple PDE you discretise the domain, apply something like the Galerkin method [1] to convert your true problem on the continuous domain to an approximate problem on the finite-dimensional discretised domain. For particularly simple PDE the approximate problem turns into a gigantic linear system of equations, A x = b. The derivations to figure out the exact form of A and b might be fiddly, but not fundamentally challenging. Then you solve for x. Large-scale linear algebra is relatively well understood and industrialised. As dimensions of problem are so large, iterative methods [2] are used to obtain an approximation to x without needing to compute an explicit inverse matrix A^-1. Discretised PDE generally produce sparse matrices A, which are efficient to compute with, whereas A^-1 will be dense, and you do not want to try to work with A^-1 explicitly.

Theoretically, given certain assumptions you can prove desirable properties about finite element schemes. One highly desirable property is that the sequence of approximate solutions with smaller and smaller mesh sizes converge to the true not-approximated continuous solution in the limit as the mesh size goes to zero. Some of the assumptions required to guarantee convergence might place restrictions on the shape of your mesh -- e.g. if the mesh is triangulated and some mesh elements become arbitrarily thin and pointy, the approximation may not be guaranteed to converge.

[1] https://en.wikipedia.org/wiki/Galerkin_method [2] e.g. https://en.wikipedia.org/wiki/Krylov_subspace

> MRI and similar scanners

I have no idea how the physics, sensors and hardware side of MRI works, but once you have the data and equations from some physical model linking the state you want to infer to the observed data, it is some kind of mathematical inverse problem to estimate and infer the state from the observation, and we're back in applied math & industrial linear algebra territory. No magic.

MRI is easy, conceptually, at least. The nucleus of the hydrogen atom (or other target of choice) wobbles at a frequency directly proportional to the ambient magnetic field. MRI machines have a VERY uniform but strong magnetic field. If you left all the other scanning coils off... it would detect ALL of the hydrogen in your body at the same time, at one very narrow frequency band.

By adding a gradient to the field along your spine, for example... they can cause the magnitude of the field to ramp as you go from head to toe. By sampling at frequencies above and below the resonant field, you can now detect that hydrogen in a plane slicing at right angles to your spine, it's still a single value, but now you've narrowed the selectivity to a small slice of a single axis. By sweeping the frequency, you can get a set of values that vary with the hydrogen content of your body along that axis.

You repeat across all 3 axis, and you can effectively sample very small areas of the body sequentially. The modern MRI machines are a highly optimized version of this process. (And I think they sound like dancing chipmunks when they start)

It is possible to use the earth's magnetic field to do MRI scanning. The rate at which you can discriminate signals is proportional to the frequency, and this has to work at audio frequencies (about 2 khz), so images take hours or days.

CAT scanners have an X-ray source, and a linear detector array mounted opposite each other on a ring that spins continuously as you are moved through the scanner. The position of the source and each detector element are known to a high degree of precision for each and every moment of the scan. Thus each detector signal at any given moment is the density of your body along a line between those two points.

All of the data becomes a set of simultaneous linear equations. The computer solves these equations and generates a 3 dimensional array of voxels (volume pixels), which are then saved as your CAT scan data.

The viewer software can then show a view through any arbitrary plane, adjusting contrast, etc.

> CAT scanners have an X-ray source, and a linear detector array mounted opposite each other on a ring that spins continuously as you are moved through the scanner.

Just a nit-picky detail; in human CT scanners it's usually a (linear) array of 2D detectors, not a line-detector.

so they're actually doing 2d data capture.. oh... that makes sense... otherwise you waste all the x-ray that went through the patient slightly off the plane of the circle.

We don't want to waste X-ray exposure, do we?

Ultrasound is usually a linear array of 256 or more transducers that can use timing information to direct an ultrasound signal in a range of directions. By moving the pulse origin left and right, and altering the direction, it is then possible to generate a 2d image of the area in contact with the probe.

It is possible to listen for echoes that are doppler shifted, to measure velocity of the bloodstream, for example. This information can be gathered in that same 2d image, to generate estimates of blood flow, and quite variety of other information without invasive procedures.

Integrated circuits, especially modern computer processors are extremely complex
For this, I recommend working through the simulation "game" NAND2Tetris, where you work from the basic building blocks up to an simulated CPU, and onward to programming a game of Tetris.

I was in Chemistry class when the professor explained how using standard stoichiometric formulae, a transistor worked.... I was gob-smacked... and can NOT find a good equivalent to that using google right now.

I know how it works but CPUs. How they’re built seems like some wizard shit.