Friday Puzzler: My URL is smarter than your URL...

Here is today’s puzzler. (With thanks to Alejandro, aka Brenda on the weekends, for the idea.)

Write a UDF that takes a URL as the argument. The UDF will download the source, strip the HTML, and examine each word for letter count. It will then return the average number of letters per word. This will be called the “smart” score for a URL.

Yes, I know that using big words doesn’t make you smart. It’s for fun. As always, the rules are simple. You win nothing. There are no winners. If it takes you more than five minutes to write it - you lose.

Enjoy! As a reminder, you can paste the code here, or paste a URL. I’m curious to see how some big sites do too. Back in the day there was a cool site that let you “fight” URLs. It was basically a simple version of Diablo. I don’t think it’s around anymore though. (And yes, it was written in ColdFusion.)

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Comments