28 ms·
over the years i've had to translate a lot of code from academics/researchers into prod systems, and variable/function naming is one of their worst habits. jus
by parpfish 2y ago
over the years i've had to translate a lot of code from academics/researchers into prod systems, and variable/function naming is one of their worst habits.
just because the function you're implementing used single-character variables to render an equation in latex, doesn't mean you have to do it that way in the code.
a particular peeve was when they make variables for indexed values named`x_i` instead of just having an array `x` and accessing the ith element as `x[i]`
- Breza 2y agoAt least I've never seen UTF8 math symbols in the wild. Julia, Python, and other languages will let you use the pi symbol for 3.14... instead of just calling it pi.
- JoshTriplett 2y agoI've seen that. Some Haskell libraries use Unicode for custom operators. Makes the code even harder to understand.