I value interfaces and existing functions that let software be used directly and avoid unnecessary reinvention. My views on app design, algorithm implementation, and PyTorch APIs connect through a preference for accessible, reusable functionality; they also complement my broader code style and language habits.
I think LLM assistants are going to be a good forcing function to make sure all app features are accessible from a textual interface as well as a GUI.
I acknowledge that a strong enough AI can drive a GUI, but I think it makes so much more sense to make the GUI a wrapper around a command line interface an LLM can talk to directly.
I thought I had good reason to code up a vectorized binary search, and found it kind of fun to do.
I decided the standard torch.searchsorted() works well enough, so I used it rather than continuing with a custom vectorized binary search.
Despite all the emphasis given in computer science curriculums and job interviews, actually implementing classic algorithms is a rare event.
If I had to, there was ample opportunity to specialize with fixed power of two sizes.
I think using existing functions is usually the right call, while deciding between adding a new dependency and writing my own implementation can be harder.
NumPy’s fromfile()/tofile() make me smile; they write and read raw bytes without typing or byte order metadata. A joyful API!
I think PyTorch made the right call standardizing on signed 64 bit indexes.
If int32 indexes were an option, I would probably still make case by case decisions to use int32.
I see that tendency as pointless, because Some old habits linger. This connects to my broader code style and language habits.
I wish PyTorch had them natively on tensors, so I wasn’t doing so many tensor.cpu().numpy() operations.
I had written pretty good first-principles code to do some tensor rearrangement, only to find that PyTorch has a built in function that does it faster.
I had made a point of at least skimming the docs of every torch and tensor function, though a function may not stick in my head if I don’t know what I would use it for until the opportunity arises.
Pixel_unshuffle was the PyTorch function I had overlooked when writing tensor-rearrangement code.
Related: skills and voice in ai, debugging and reliable software, representations for code