1,038 karma · joined December 12, 2012
Here's one example that the rule caught: https://github.com/captbaritone/vscode/blob/ab86e0229d6b4d0c...
I've been writing JS for over 10 years now, and I'm not sure I would have caught that in code review.
Overall, my point with the examples was to highlight that these are mistakes that even make their way into high visibility projects built by highly competent engineering teams.
That said, looking at the issues few were in really critical paths of these projects. Often they cropped up in auxiliary areas like test harnesses or more off-the-beaten-path features. One can assume the same bugs may have existed at some point in the development cycle in other areas of the code base, but they got caught by more rigorous testing/review of those areas, or bug reports. But it's surely a time saver to identify them _as the developer saves the file_ rather than later in the process. The sooner you catch the bug, the more engineering energy you save.
I hope the take away for the reader is: If you can think of other rules that will detect useless code, you should pursue them, because they are likely more valuable than just enabling dead code elimination. They have a high probability of being able to uncover interesting bugs/mistakes as well, which is much more valuable.
I like the idea that different readers of the same code base could opt for differing levels of explicitness when it comes to operator precedence. One thing that working on the project helped demonstrate for me is that adding parens around _every_ subexpression is _way_ too noisy. So, you need to draw the line somewhere. But for me, I prefer drawing that line on the noisier side.
My writeup of the Winamp Skin Museum can be found here if anyone wants to learn more: https://jordaneldredge.com/blog/winamp-skin-musuem/
Specifically, we let you load Milkdrop visualizer plugins via a query param, but that involves arbitrary js execution. We have a solution that we've built and shipped, we just haven't yet disabled the old system.
More info on the Wasm compiler we built as part of that solution can be found at my blog: https://jordaneldredge.com/blog/speeding-up-winamps-music-vi...
Once nice thing about Mermaid is it's built into [GitHub's markdown](https://github.blog/2022-02-14-include-diagrams-markdown-fil...) and has support in Notion
(Required paid Spotify account)
All of these are used for search (text is indexed into Algolia) and ranking:
Most likes/retweets are shown first, then approved, then rejected. NSFW skins are deprioritized as well.
The Winamp Skin Museum is powered by a sqlite3 database containing 1.2gb of metadata about 86,000 Winamp skins.
It's all exposed in this explorable GraphQL endpoint
https://api.webamp.org/graphql
A bit about the data...
It includes:
* Original filenames and md5 hashes of each skins
* Names/metadata of all files compressed WITHIN the skins (file size, date, filename)
* Text content of all text files found within the skins
* URL/likes/retweets if the skin was share by @winampskins (or on Instagram)
* Full metadata/info about each skin's @internetarchive page
* Info about manual reviews (good to tweet? NSFW?)
* URLs to download skin files or screenshots
Kind [of] fun data to comb though (if you're like me).
If anyone is interested in getting the raw DB to play with, or has ideas for extra stuff to expose in the graph, get in touch.
It can render real Milkdrop presets and real classic winamp skins directly in the browser.
Also, it’s open source: https://github.com/captbaritone/webamp