Why Scripts Beat Aliases (Most of the Time)

2025-03-05
Why Scripts Beat Aliases (Most of the Time)

The author initially relied heavily on shell aliases for common commands like shortening `git` to `g`. However, they transitioned to using scripts within their `$PATH` for several key advantages. Scripts offer immediate updates without requiring shell restarts, support multiple programming languages, handle complex logic more effectively, and provide greater portability across different systems. While aliases excel in specific niche cases (e.g., modifying `cd`, conditional definitions) and offer slight performance benefits, the author prefers scripts for their flexibility and extensibility in everyday command aliases.

Read more

Failed Attempt: Shrinking npm Packages with Zopfli

2025-01-27
Failed Attempt: Shrinking npm Packages with Zopfli

The author attempted to reduce the size of npm packages by using the Zopfli compressor to improve performance and reduce storage costs. While Zopfli produces smaller files than gzip, it's significantly slower. The author successfully tested this on their own projects and submitted a proposal to npm maintainers. However, due to the slower publishing speed introduced by Zopfli and incompatibility with the npm lockfile, the proposal was ultimately rejected. Despite the failure, the author gained valuable experience and considers it a worthwhile endeavor.

Read more
Development