-- Leo's gemini proxy

-- Connecting to freeshell.de:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-GB

Hashtags tweak #️, Code snippet of the day 💻

Hashtags tweak

I got the hashtag URL wrong every time I typed it, so chopped the end off.

gemini://freeshell.de/hashtags/_hashtag

See? No ".gmi" at the end. Apologies to the people (person?) who had used the old link format.


Code snippet of the day

While reviewing some code for a work colleague, I noticed that the following had been removed.

boolean error = false;
if (error)
    throw new RuntimeException("ERROR of some kind");

After I'd had a good laugh, I thought about the levels of wrongness.

No one is that stupid, so what did you mean to write? We'll never know.

What is the initialised-but-never-assigned variable "error" for? Maybe just to obfuscate "if (false)"?

If you thought it might throw, at least throw something meaningful (like GammmaRaysCausedBitFlipException perhaps).

If you thought it might throw, what's with the message?

I'll ignore the fact that you missed out the curlies, although that bothers a lot of people.


I approved the change, after reviewing the rest. There were more than 3 lines!

-- Response ended

-- Page fetched on Tue Apr 23 10:25:25 2024