What’s that “new” doing in my inner loop?

I didn't think my code was running THAT slow, but it's always nice to periodically take a break and think of performance. Now we all know that the right way to approach code optimization is to profile the code rather than rely on our intuition, but there are a lot of things we know are …

Advertisements

“It’s a trap!”: The Major Refactor

Welp, I fell into it. I fell into it gradually, in stages, without meaning to. In much the same way, I suppose, as the founder of Theranos became a career criminal. It started with good intentions. I had a problem with the data display in the simulator - some of the graphics looked awkward - …

An amateur’s view of clang and gcc

I was happily tinkering away with some C++ code on my mac. The only fancy thing I had done was to replace the bundled compiler with clang 6.0 which supports C++17 (because I wanted to use std::optional - long story). My program was compiling and working and I was happily building it out when I …

Computing orbits (3)

I wanted my little toy solar system simulator to use and display the actual planetary position data (called ephemerides) curated by NASA. NASA distributes this ephemeris data in the form of binary files they call kernels. My first contact with the mass of documentation and code around these raw data files left me intimidated. All …