Music Monday: The Sound

The melody of The Sound by Carly Rae Jepsen plays in the background as I write the opening sentence for this blog post. When I hear a song in a playlist that I love, I often take a screenshot of the song name to remind me to listen to the song later. I often forget to go back and … | Continue reading


@jamesg.blog | 1 month ago

IndieWeb Movie Club October 2024

Running monthly, the IndieWeb Movie Club is an invitation to watch a movie chosen by a selection of rotating hosts and, optionally, write your thoughts about the movie on your personal website. Mark started the blogging challenge with The Matrix, then Benji hosted September’s eve … | Continue reading


@jamesg.blog | 1 month ago

Morning coffee

Nine white coffee drippers rest on a wooden stand in a cosy coffee shop in the heart of London. “Can I get a cap [cappuccino] in ceramic?” says one barista as I stand and wait in line. Another barista, who is at the espresso machine making coffees, responds in a melodic tone “Cap … | Continue reading


@jamesg.blog | 1 month ago

Books set in bookshops

I love bookshops. I enjoy perusing the shelves in search for a new book to read, and the excitement that comes when I find a title that looks like exactly the kind of thing I might enjoy. I love seeing the new releases, searching for if there are new editions out of book series I … | Continue reading


@jamesg.blog | 1 month ago

Noticing

The views from the Millenium Bridge in London are incredible. Opened in 2000s by Queen Elizabeth II, the bridge connects St. Paul’s Cathedral with the Tate Modern gallery. Standing there a few days ago while on holiday, I found myself gazing at the Tower Bridge. I had arrived in … | Continue reading


@jamesg.blog | 1 month ago

The musical

Never give up, said the person sitting next to me in the theatre as we chatted in the interval of Hamilton. When I arrived at the theatre in London’s West End, I took my seat and looked around at the room. This was my first time going to see a musical. I was entranced by the buil … | Continue reading


@jamesg.blog | 1 month ago

The basement restaurant

It has been a busy day, characterised by delightful adventure. You have spent the day doing many of your favourite things, and trying new things, too. Night has fallen on the busy city and you find yourself in the heart of town: the place where you can find any cuisine that you s … | Continue reading


@jamesg.blog | 1 month ago

The Underground guitarist

Sweet Caroline, ba ba ba. Good times never been so good., sang, passionately, a group of friends who had just disembarked a London Underground train. I was at the foot of the escalator to go back to street level. As I went up, I saw people glancing, with joy, at the people singin … | Continue reading


@jamesg.blog | 1 month ago

Fernande with a Black Mantilla

I remember vividly when I first saw Picasso’s “Fernande with a Black Mantilla” painting. I was visiting the Guggenheim museum in New York. The spiral dome was under maintenance in preparation for a new exhibit (although that did not stop me from peeking through the curtain to see … | Continue reading


@jamesg.blog | 2 months ago

Moments of joy: The bus ride

Every day, I look out for little things that make me smile. I sometimes take notes, knowing that those notes may bring back memories of the thing that brought me joy and the moment surrounding it. My Moments of joy series, in which I document things that made me smile, has helped … | Continue reading


@jamesg.blog | 2 months ago

An Introduction to the Personal Web with Cosy and Cali

“I’m just trying to think of a way to start this,” thought Cassie, as she embarked on her first blog post: an interview with two of her friends on what the web means to them. An assignment to pass her journalism class. Cassie: “Hello, everyone. Thank you for joining me today for … | Continue reading


@jamesg.blog | 2 months ago

The lifecycle of a search query on my blog

Suppose you are looking for my Aeropress recipe. To find this information, you could turn to my blog search engine. This search engine indexes all of my blog posts. The search engine is powered by JameSQL, a NoSQL document database. Turning text queries into JSON queries Let’s st … | Continue reading


@jamesg.blog | 2 months ago

Improving relevance on my site search engine

The search engine on this website is powered by JameSQL, an open source, NoSQL database. The engine accepts a query and evaluates it according to any conditions specified. I strive to keep query times below 10ms, to help ensure the search experience feels and is as fast as possib … | Continue reading


@jamesg.blog | 2 months ago

Blogging before dinner

I was speaking with a friend yesterday about finding the time to write blog posts. I offered a tip that has worked for me recently: write before dinner. A few months ago, I had a work project and I decided to set myself a 20 minute deadline. I put my dinner in the oven, then star … | Continue reading


@jamesg.blog | 2 months ago

A quiet room at Vienna airport

On my way back from a trip to Vienna, I got breakfast at the airport. My flight was early, so I was especially looking forward to having a coffee with my meal. At the breakfast eatery I visited, there was a quiet room. The room was detached from the rest of the cafe with a glass … | Continue reading


@jamesg.blog | 2 months ago

Hope for the web

The web has changed all of our lives: we are more connected than ever, knowledge is easier to access than ever. But sometimes it feels that we are subjected to that change, rather than being able to proactively participate in making the future; in crafting a web that speaks to wh … | Continue reading


@jamesg.blog | 2 months ago

Implementing a transaction log for JameSQL

This blog post describes my thought process in implementing a transaction log for my database. My implementation may not follow best practices, as I am still learning. If this blog post sparks ideas on what I could do better, please let me know! JameSQL, my NoSQL database, was de … | Continue reading


@jamesg.blog | 2 months ago

Clustering blog post titles with unigrams

I was having a conversation yesterday with a reader about clustering news headlines according to similarity. This had me reflecting on some of my past experiments with clustering and sorting, where I have used word embeddings to find similar documents. Word embeddings encode sema … | Continue reading


@jamesg.blog | 3 months ago

Writing a search query transpiler

Google, among other search engines, supports advanced operators for writing refined search queries. For example, you can use the site: search operator to constrain your search to a website, like: site:reddit.com aeropress coffee recipe In my How to build a query language in Pyth … | Continue reading


@jamesg.blog | 3 months ago

Adventures building a spreadsheet engine in Python

Spreadsheets are a fascinating tool. With a spreadsheet, you can both store and structure data, and include formulas that run computations on the contents of a sheet. Every so often, I ask myself how a spreadsheet works. How do spreadsheets turn data and a list of formulas into a … | Continue reading


@jamesg.blog | 3 months ago

Building a NoSQL database in Python

This post is not an authority on how to make a NoSQL database, rather how I made mine. I am still actively learning this topic, but I wanted to write my thoughts to help me process what I am learning. I have used NoSQL databases for search projects in the past. A NoSQL database l … | Continue reading


@jamesg.blog | 3 months ago

How to implement a time-based LRU cache in Python

When you are building applications, you may want to add a cache to parts of your application. For example, consider a web directory that lists recipes. The directory has thousands of recipes available. You may want to add caching to database queries so that you don’t have to look … | Continue reading


@jamesg.blog | 3 months ago

Python pattern: Using defaultdicts to initialise dictionaries

When you are working with dictionaries in Python, you may be familiar with the following process: You initialize a dictionary. You iterate over data. You check if a key is in a dictionary. If it isn’t, you add a default value. You add to the value associated with the key (i.e. to … | Continue reading


@jamesg.blog | 3 months ago

Introduction to consensus modeling in Python

Consensus algorithms allow computer scientists and data analysts to answer a question based on information from several data sources. These data sources may be independent, or data taken from the same source but at different time frames. Consider a scenario where you are building … | Continue reading


@jamesg.blog | 3 months ago

How I design my URLs

Websites that use well-defined URL structures are easier for me to navigate. When I use a site enough, I can remember specific paths, infer the structure of a site so I can find the page to which I want to go, and more. Some affordances of clean URL design, such as ease of naviga … | Continue reading


@jamesg.blog | 3 months ago

Saturday morning reading

One flat white, please. I sometimes order food, too; a warm croissant or fruit. I sit down at a table and take out my book from my backpack, the book I packed the previous day. Sometimes, I have two, if I am on the cusp of finishing one of them. I recline back in the chair in whi … | Continue reading


@jamesg.blog | 3 months ago

How to implement TF-IDF in Python

In the “How to build a search index in Python” tutorial, we walked through how to build a search index in Python. This index, when queried, gives equal weights to all words that you use in your query. Thus, you can retrieve documents that contain words, but the documents are not … | Continue reading


@jamesg.blog | 3 months ago

How to build a query language in Python

In this guide, I walk through how to build a query language in Python. No required knowledge of query languages is required to follow this guide. You will find this article easier to understand if you have some knowledge of trees. This guide should get you set up with all the inf … | Continue reading


@jamesg.blog | 3 months ago

Designing the content layout for my website

When I was re-designing my website, I put a lot of thought into the content section. I wanted to ensure my content was as readable as possible for as many people as possible. This meant that I wanted to design a default experience that adheres to design best practices. The design … | Continue reading


@jamesg.blog | 3 months ago

Designing a fuzzer for Knowledge Graph Language

I have been writing a test suite for Knowledge Graph Language (KGL), a concise syntax for querying knowledge graphs. My test suite ensures that, given a specific input, the language execution engine returns the correct response. Specific functionalities are tested, too, such as d … | Continue reading


@jamesg.blog | 3 months ago

My (CSS) style

’Cause we never go out of style, we never go out of style… Wait… that’s a Taylor Swift lyric. This blog post is about a different kind of style: CSS styles. (Long-time readers, please disregard that this is the second blog post in which the topic is style and I referenced a Taylo … | Continue reading


@jamesg.blog | 3 months ago

Moments of Joy: Inspiration and practice

In response to my Ask the Website Maker blog post, a reader asked about my Moments of Joy series, curious about what moments I include, whether any moments are unpublished, and how I write the notes. That question inspired this blog post. In Februrary 2023, I blogged one of, if n … | Continue reading


@jamesg.blog | 3 months ago

The rainbow

While sitting at my desk, I gazed up at the window and saw red, orange, yellow, green, blue, indigo, and violet. A rainbow. This is the second one I have seen over the last few days. Today’s rainbow looked like the bottom was close to my house. With a spontaneity that I didn’t re … | Continue reading


@jamesg.blog | 3 months ago

The little moments

Would you like your scone warmed up? asked the barista as I placed my order in the bookstore cafe. I was touched by the question. I am used to cafes asking questions about the preferences of an order – “would you like that with oat milk?”, “what size of coffee would you like?” – … | Continue reading


@jamesg.blog | 3 months ago

Ask the Website Maker (Me!)

I am sincerely grateful for all of the knowledge people share about personal websites on the internet. From other blogs, I have found inspiration of things I can do on my website. I have learned how to do things I was previously unable to do. I have been inspired to create new th … | Continue reading


@jamesg.blog | 3 months ago

Tools and time

What is essential for this interface?_ is a question I have been thinking about in designing new digital interfaces and tools. Another way of framing this is “what do I really need?” When I went to re-design this website, those two questions were at the forefront of my mind. As I … | Continue reading


@jamesg.blog | 3 months ago

The boarding line

Final boarding call for flight to Dublin, said the voice through the loudspeaker. I stood up and walked toward the end of the boarding line. It was one of those long, winding lines. There was a bit of awkwardness to figure out where to stand at the end of the line. As I maneuvere … | Continue reading


@jamesg.blog | 3 months ago

Fog

One of my favourite parts of San Francisco is the sun setting over the Golden Gate Bridge. I love the view from Fort Mason all the way to the marina and toward the bridge. I enjoy the array of colours and how they illuminate the horizon: the pinks, purples, reds, oranges. On my t … | Continue reading


@jamesg.blog | 3 months ago

Place

It makes such a difference to someone’s day when you have a smile on your face., I said. The driver responded by saying “Exactly!”, in a tone of equal parts excitement and sincerity. I was in a taxi heading for work. I had my first coffee for the day, an iced mint mojito. A San F … | Continue reading


@jamesg.blog | 3 months ago

The coffee shop

While walking down a street you have not yet explored, you notice a shop with tall, glass windows. On one window reads “Athena’s Coffee Shop” in traditional lettering. The kind of lettering you may associate with an old-timey store. But the interior is everything but dated. Throu … | Continue reading


@jamesg.blog | 3 months ago

The morning taxi ride

had been walking for half an hour along the Embarcadero in San Francisco, among my favourite places to walk in the morning. I can walk for miles and see beautiful sights along the way: bridges, palm trees, and people, like me, who have decided to start their morning with a walk. … | Continue reading


@jamesg.blog | 3 months ago

reflection

the fidelity of the reflection. | Continue reading


@jamesg.blog | 3 months ago

The summer sunset

After days of rain, I have been looking forward to seeing the sunset. I often note to myself that I should savour the sunset, watching as the sun recedes over the hills and changes the colour of the sky. Today, I am looking out another window through which I can see another part … | Continue reading


@jamesg.blog | 4 months ago

taste

the complexity of taste. | Continue reading


@jamesg.blog | 4 months ago

Build a search index in Python

How can search engines be so fast? While there are many parts of a search system, one of the key concepts to know is the inverted index. Suppose we have the following strings, all Taylor Swift lyrics: I made you my temple, my mural, my sky And I still talk to you when I’m scream … | Continue reading


@jamesg.blog | 4 months ago

Music Tuesday

My favourite movie is The Map of Tiny Perfect Things, in which two characters discover they are stuck in a time loop. They use the time to make a map of all the wonderful things that happen in a small town. Toward the end of the movie, the song Frame of Reference by the Drug Stor … | Continue reading


@jamesg.blog | 4 months ago

Ideas, over coffee

It is a warm, summer day. The sky is clear. The clouds has receded after days of rain. Over your morning coffee, you take a breath and realise the stillness of the moment. The wisps of steam coming from the side of your favourite coffee cup; the one that feels just right in your … | Continue reading


@jamesg.blog | 4 months ago

the pink sky

Lying in bed, you look through the window as the sun sets. It has been a rainy day. The sky was a blanket of clouds. As evening progressed, a soft pink hue emerged from the horizon. On a clear day, more of the sky would be pink. Today, the stokes of pink visible on the horizon ar … | Continue reading


@jamesg.blog | 4 months ago