Using Chrome AI for Translation

I’ve done a couple blog posts now on Chrome’s efforts to bring generative AI to the browser. It’s still somewhat of a rough process (remember, you can sign up for access to test and learn more at the intro post from the Chrome engineers), but it’s getting better over time. One thing I mentioned in my last post ("Using Chrome AI to Rewrite Text") was how the Chrome team is shipping focused APIs for specific purposes, not just general Q and A. In that previous post, I demonstrated an example of the Rewriter API. As yet another example of this, you can now test out on device translation. As with everything else I’ve shared in this space, you should consider... more →
Posted in: JavaScript

Using Parallel Requests to Improve Web Performance

Yesterday I blogged about a change I made to my bots page and in it, I mentioned how the performance wasn’t necessarily as good as it could be. I had made the decision to go from server-side and build-time for the page to a purely client-side solution. At the end of the post, I asked folks to let me know if anyone would like to have me work on that performance issue, and, honestly, it kept popping up in my head so I figured I should tackle it. Before I begin talking about what I changed, let me review what I had done, and what the issues are. The Current Solution You can go to the bots page yourself, but in general, this is the process: Given a list of bots… For each one, get the... more →
Posted in: JavaScript

Getting and Displaying a Mastodon Post in Client-Side JavaScript

I’ve got a few pages here that are primarily built for my own use. One of them, my bots page, is a list of all the dumbsuper useful bots I’ve built for Mastodon (and Bluesky). The idea on this page is to show the latest post from each bot. The bots page makes use of two different shortcodes written in Liquid to do this. The first uses the RSS feed of the bot to get their last toot ID: const lastToot = async (instance, user) => { let rssFeedURL = `https://$ {instance}/users/$ {user}.rss`; try { let feed = await parser.parseURL(rssFeedURL); return feed.items[0].guid.split('/').pop(); } catch(e) { console.log(`getting last toot for $ {user} returned an error`); return... more →
Posted in: JavaScript

Take a Code Break Tomorrow

Just a quick note to my faithful readers out there – tomorrow, October 22nd, at 12PM CST (Cool Standard Time), I’ll be hosting my next episode of <Code><Br>: In the previous stream, I talked about charting with JavaScript, specifically using Chart.js. In this followup, I’ll attempt to use another library so we can compare and contrast. I don’t know about you, but that sounds like a lot of fun. (I really enjoyed the last stream.) And with this being the last stream before Halloween – I may even dress up! Raymond Camden… more →
Posted in: JavaScript

Adding AI Insights to Data with Google Gemini

Yesterday, Elizabeth Siegle, a developer advocate for CLoudflare, showed off a really freaking cool demo making use of Cloudflare’s Workers AI support. Her demo made use of WNBA stats to create a beautiful dashboard that’s then enhanced with AI. You can find the demo here: https://wnba-analytics-ai-insights.streamlit.app/ I found this incredibly exciting. I last looked at Cloudflare’s AI stuff almost an entire year ago ("Using Cloudflare’s AI Workers to Add Translations to PDFs"), and I haven’t quite had a chance to try it again, mostly because I’ve been focused on Google Gemini for my Generative AI work. From an API/usage perspective, Cloudflare’s... more →
Posted in: JavaScript

JavaScript Clipboard Stuff

Forgive the somewhat vague title, but I wanted to point folks to a series of articles I’ve had published on the Frontend Masters blog the past few weeks. I started writing for them recently, and while I note my "external writing" on my About page, I wanted to specifically call out this series. Over three articles, I discuss reading and writing to the clipboard with JavaScript as well as working with paste events: Reading from the Clipboard in JavaScript Writing to the Clipboard in JavaScript Handling Paste Events in JavaScript That last article is an updated version of a post of mine from July, but it’s got some new material in it so I definitely recommend checking it... more →
Posted in: JavaScript

Links For You (10/13/2024)

Happy Sunday and Happy Saints Are Winning As I Write this day. Before I get into the links, some administrative. At the bottom of my posts, I’ve got share links. A few days ago I removed the share to Twitter link as I’ve gradually removed myself from that platform. I was on there a few weeks ago desperate for some technical help, but in general, I’m pretty much done with the platform. I’ve added a share to Bluesky (where you can find me as @raymondcamden.com) but unfortunately, it isn’t quite working yet. I followed the directions for ‘Action Intent Links’, but even the example on their docs isn’t working. I’m going to keep the share link... more →
Posted in: JavaScript

Generating Illustrated Stories with AI

A few months ago, I built a little demo that I simply forgot to actually talk about here. A coworker was building something similar and it reminded me to take a look at the code, update it, and actually share it. This is a pretty cool example of integrating multiple different APIs to create a final product, in this case, a short story with pictures. Here’s an example: How was this built? At a high level: Google’s Gemini AI is used to generate a short story. Adobe’s Firefly Services is used to generate the images. Adobe’s Acrobat Services is used to turn the text into a PDF. That’s the high level, now let’s get into the nitty-gritty. Generating a Story To... more →
Posted in: JavaScript
1 2 3 4 87