I

Intheloop

Stay in the loop in the constantly evolving dev ecosystem

Small UI fixes

- Replaced favicon
- New icon for bug tracker
- Typo fix

Fixed a bug in language detection

Freshly introduced, already found a bug. When retrieving the summary of a blog post in the RSS feed, I am getting HTML. I already stripped the tags. But I didn't decode HTML entities. With chinese characters, pretty much everything is an escaped HTML entity and that was recognized as English. So I added HTML entity decoding, too. Language detection works better now!

Detected the language of the 200 blog posts that were already in the database

Wrote a tiny migration script with Supabase + Google Cloud Client in Node

Automatically detect blog post language

This allows only showing English blog posts by default, otherwise other language will be mixed in. Using Google Cloud Translation API. Quick, reliable and cheap (for me at least), will unlikely exceed the free quota, if so, it'll only be a few cents.

Added sorting for popular tweets

Heavily using JSONB in the Supabase Postgres database. Unfortunately, using a function for sorting does not work in the Supabase JS Client.

I.e. my JSONB column is named info and it has a field createdAt

{"created": "2020-05-05T10:00:15.000Z", "other": "prop"}


With plain SQL, you could do ORDER BY (info->>'createdAt')::TIMESTAMPTZ. That doesn't work via JS client so I introduced a separate field.

Finished the Kotlin topic

Just had to add a book and a few courses

Fixed a few UI quirks and completed the Vite topic for now

There's no podcasts, newsletters, books or courses. Not many RSS feeds to parse blog posts yet. Not too many communities (not necessarily a bad thing). It's also a pretty fresh technology.

Display popular tweets

Finished scraping popular tweets yesterday. Added a Firebase function to return a list of tweets for a topic (requerying the Twitter API to get latest information) based on the tweets I marked as popular earlier. Allows me to also include caching when it's needed in the future and avoid any API rate limits.

Set up double opt-in for the newsletter with EmailOctupus

Took a while because I couldn't receive any mails with my namecheap email and Netlify DNS. Found out over an hour later that I was still using Vercel DNS and forgot to switch.

Took me a while, struggling with the Twitter API at first, but I got the initial logic for automatically finding popular tweets for topics done.

I was expecting this to be quicker but it took a lot of time to get into the Twitter API. Lots of confusion, my main account not being allowed to register for a dev account and so on. I'm glad I finally got this one to work and any adjustments are fairly easy from now on.

Running scheduled via Firebase and writing the data to Supabase.

Continue to explore the Twitter V2 API for extracting popular tweets

Get the twitter search API to work

This took way longer than expected. There's V1 and V2 (alpha). There's multiple tiers and each tier may be able to use different query parameters or even content within query parameters. The official Postman collection for V2 uses the old OAuth 1.0, while the API does support OAuth 2.0 and some endpoint work with OAuth 1.0, but only when you're using specific parameters, otherwise they only work with a bearer token. This frustrated me a lot more than it should have. Anyways, finally figured it out.

Finish newsletter sign up by implementing a Firebase function and using the EmailOctopus API for subscription

Added newsletter signup in footer

Still need to implement the backend function to actually signup

Rather than searching for the issue in Netlify forms I just implemented a super simple form with Supabase for storing the submissions.

Now getting blog posts from Supabase and displaying them per topic

Next up: Automatic retrieval of blog posts.