Alisdair McDiarmid writes programming notes on ARM encoding and C JSON parsing, and is known for the Kill Sticky Headers bookmarklet.
HN repeatedly recommends the Kill Sticky Headers bookmarklet, with users saying one click removes annoying sticky navbars and popups.
The one thing that immediately caught my eye is the lack of fixed-width-ness (for lack of a better term) in the value displays. IMHO besides being somewhat annoying to read it can be rather misleading, which is bad especially for something "designed specifically to use as a teaching tool". It's misleading because it doesn't show that the storage for the values is fixed-width. For example, this clearly shows that the registers are 32 bits and never anything but:
R0 0000BEEF
R1 000BEEF0
R2 000000BE
R3 00000001
R4 BEEF0000
R5 00005F77
R6 00000000
R7 00000000
...
I've taught Asm before and seen so many students get this wrong that it's worth calling out. In fact the right example under the "Error Correction Suggestions" section gets this wrong too --- that's an assembly/syntax error, not a runtime error. (ARM's immediate value encoding is also worth looking at if you haven't seen it before, since it's not just a single 32-bit value either: https://alisdair.mcdiarmid.org/arm-immediate-value-encoding/ )
The other thing that I'd suggest as an improvement is a 16-byte-hexdump mode with ASCII on the right for "View Memory Contents". Other than that, with perhaps the exception of "infinite loop detection", the other features look useful.
I’ve tried a lot of ad blockers over the years. Browsing mainstream news on the internet, in particular, highlights the absolute cesspool of pop ups and auto-playing videos that characterize the contemporary web.
None, least of all Stop the Madness, have worked as well and on as many devices as this simple bookmarklet, whose author I don’t know but who has saved me countless aggravations
javascript:(function%20()%20%7B%20var%20i,%20elements%20=%20document.querySelectorAll('body%20*');%20%20for%20(i%20=%200;%20i%20%3C%20elements.length;%20i++)%20%7B%20if%20(%5B%22sticky%22,%20%22fixed%22%5D.includes(getComputedStyle(elements%5Bi%5D).position))%20%7B%20elements%5Bi%5D.parentNode.removeChild(elements%5Bi%5D);%20%7D%20%7D%20%7D)();
Edit: credit to the original author [1] and thank you!
1. https://alisdair.mcdiarmid.org/kill-sticky-headers/
> The amount of those popups elements I have hidden using ublock with right click, it's staggering.
I have a bookmarklet saved that simply deletes fixed elements, making it faster and easier to get rid of those[0]. However I have noticed sites are starting to make their banners more akin to shrinkwrap agreements where they state that dismissing the popup or continuing to read without making a choice is equivalent to acceptance.
[0] What I find most interesting is how many websites become much more readable by this - I hate sites that use a good third of the screen real-estate for headers and footers, nevermind those awful menus that only appear on scroll-up and cover the top few lines of content.
https://alisdair.mcdiarmid.org/kill-sticky-headers/
You don't even need unusual architectures - e.g. it's pretty easy to find a constant that might be fast to encode a value as 2 immediate and store the value in memory as two halfword stores on ARM - see https://alisdair.mcdiarmid.org/arm-immediate-value-encoding/ for the immediate encoding. It might be quicker than loading those immediates into a register, shifting and or-ing them as necessary, and then doing a single store. Especially if your focus is on code size (for small platforms or cache utilization reasons).
An I wouldn't be surprised if there's some weird x86 encoding that in some cases helps code size similarly, with different encoded instruction lengths allowing for different immediate sizes.
https://alisdair.mcdiarmid.org/kill-sticky-headers/
Also, to nicely format the Jira issue I'm looking at, to paste into task trackers:
javascript: (() => { const tagEl = document.querySelector( '[data-testid="issue.views.issue-base.foundation.breadcrumbs.current-issue.item"]' ); if (!(tagEl instanceof HTMLElement)) return; const tag = tagEl.innerText; const nameEl = document.querySelector( '[data-testid="issue.views.issue-base.foundation.summary.heading"]' ); if (!(nameEl instanceof HTMLElement)) return; const name = nameEl.innerText; const text = `[${tag}] ${name}`; navigator.clipboard.writeText(text); })();
For "manual" cleanup I'm using slightly extended universal "Sweep Stickies" bookmarklet [1], based on idea taken from "Kill Sticky" [0]. Removes generally all those banners and overlays obscuring content and eating viewport. (Userscript available [2], but I prefer good old bookmarklet way for this.)
It literally crawls all elements in page, tests their computed style and removes those with sticky position (and a bit more). Works quite well for me.
[0] https://alisdair.mcdiarmid.org/kill-sticky-headers/
[1] http://myfonj.github.io/utils/bookmarklets/sweep-stickies.html
[2] https://greasyfork.org/en/scripts/370572-sweep-stickies