πŸ—» James Van Dyne

✈️Trips πŸ—ΊοΈMaps ✏️️Blog πŸ”—οΈοΈLinks πŸ‘‰Now πŸƒRuns
  • 🏑Home
  • ✈️Trips
  • πŸ—ΊοΈMaps
  • ✏️Blog
  • πŸ”—οΈLinks
  • πŸ‘‰Now
  • πŸƒRuns
  • ✏️Articles
  • πŸ“€οΈReplies
  • πŸ’¬Status
  • πŸ”–οΈοΈBookmarks
  • πŸ—ΊCheckins
  • πŸ“…The Week
  • πŸ–₯Tech
  • 🌲Sustainability
  • πŸƒRunning
  • 🧠Thoughts
  • πŸ‡―πŸ‡΅Japan
  • πŸ’‘TIL
  • β›°Tanzawa
  • 🏑Home
  • ✏️Articles
  • πŸ“€οΈReplies
  • πŸ’¬Status
  • πŸ”–οΈοΈBookmarks
  • πŸ—ΊCheckins
  • πŸ“…The Week
  • πŸ–₯Tech
  • 🌲Sustainability
  • πŸƒRunning
  • 🧠Thoughts
  • πŸ‡―πŸ‡΅Japan
  • πŸ’‘TIL
  • β›°Tanzawa
  • Apr 04, 2021
    by James
    I’ve got all of my extractors written. Next up is actually importing the content. In my import I’m also going to automate cleaning up some of the markup.Β 

    • Removing link wrappers around images. I.e. images posted from Sunlit wrap all images with an a tag. I want to strip that.Β 
    • Rewriting all attachment links to their new Tanzawa permalink.
    • Rewriting all internal links to their new Tanzawa permalink.

    I have a few pages on blog. I’m not sure I want to support pages yet (at least not in such a free form). I could import them as posts, so the content moves over. But instead I think I’m going to move them to my wiki instead.
    πŸ”—permalink
  • Apr 02, 2021
    by James
    There's still a slog ahead for importing posts, but it seems manageable. I wrote a bunch of utility functions (with tests) to extract and normalize individual fields of data from a post.Β 

    The idea being, once I can extract the data easily, I should be able construct my records by simply calling each function (more or less).

    Migrating comments is going to be tricky as I only support webmentions in Tanzawa and not all comments on my blog originate from webmentions. I think I'll probably just not import comments/webmentions until after I migrate my blog to Tanzawa.
    πŸ”—permalink
  • Apr 01, 2021
    by James
    After a day-ish of trying to figure out a nice clean ( Javascript-less ) way to make a queue to import images, I decided to just forget the queue and let Tanzawa import images as fast as possible. The number of simultaneous requests seems to be limited by the browser anyways.

    The last thing I need to do is import individual post content. Maybe it's because I'm not building fun features, but this last Wordpress import feels like such a slog.
    πŸ”—permalink
  • Checkin to Starbucks

    Starbucks 35.42861 139.506997
    Apr 01, 2021
    by James
    in Kanagawa, Japan
    Sakura donuts with Leo. Perfect weather for enjoying the terrace seats.
    2021-04-20T22:00:56.jpg 769.6 KB
    πŸ”—permalink 4 interactions
  • Checkin to Ootoya (ε€§ζˆΈε±‹)

    Ootoya (ε€§ζˆΈε±‹) 35.41346620241779 139.4998855400563
    Mar 30, 2021
    by James
    in Yokohama, Kanagawa, Japan
    Yum!
    2021-04-20T21:52:28.jpg 591.1 KB
    πŸ”—permalink 7 interactions
  • πŸ”— Izumicho, Kanagawa, Japan Air Pollution: Real-time Air Quality Index

    Mar 30, 2021
    by James
    How polluted is the air today? Check out the real-time air pollution map, for more than 100 countries.
    Love this site that shows me the air quality from around the world. The simple visualization at the bottom with a colored square for each day of the year really lets you easily see trends in air quality over time. Izumi-ku, Yokohama's air quality looks to be improving over the years. Yay!
    1. Tagged with
    2. japan
    3. air quality
    4. pollution
    πŸ”—permalink
  • Mar 30, 2021
    by James
    I made a fun hack for importing images. I'm using (part) of the Hotwire stack for the dynamic portions of Tanzawa. Most dynamic web applications today use client side rendering, which means the server sends a json data structure and your browser has code/templates/logic to instruct it how to turn it into html for display. Hotwire is "html over the wire", so all of your logic and rendering happens on the server and the browser just displays the result.

    APIs traditionally return JSON. The image import api I wrote about yesterday also returned json, because that's what apis do. I was thinking the Javascript I need to write to update the page after an element has been imported when it hit me – if each photo in the list is wrapped in a turbo-frame, my api can return html, and all of my logic and rendering is in one place on the server. Perfect!

    My plan was to then just write some Javascript that would traverse my list of images and call the api one by one. Then take the html response and replace the existing item.Β  But then I noticed that Turbo frames can have a source url i.e. I could put my import api url as the source for the frame and Turbo would automatically call it for me.

    Turbo also support lazy loading. Which means that it's not going to load the frame until it shows up on the page. Which means I can import all of my images by just scrolling down the page.

    So rather than have a bunch of Javascript to control a queue to make an api call to manually modify some html/css on the front end, I just have a list of images that you scroll down and each call is automatically made with the results are automatically updated on the page. Simple is best.
    πŸ”—permalink 1 interaction
  • The Week #38

    Mar 30, 2021
    by James

    • Exciting times in the Van Dyne household! The potty has suddenly clicked for Leo. We haven't been nearly as strict with Leo as some of our friends have been when it comes to potty training. We've taken the approach that "everybody eventually doesn't like wet diapers and grows out of it". Instead we've just been trying to make it a routine before the bath to give it a try. If he does, great and if he doesn't that's fine, we'll try again tomorrow.
    • I had Leo by myself all day Saturday and I didn't change a diaper – at all. Not because he didn't pee, but because I asked him every 3 hours if he had to go, we'd try and he'd sit and do his thing. On Sunday we thought he was just doing his thing on the loo and he did his first #2 by himself. The end of diapers is quickly approaching!
    • Part of having Leo all day Saturday meant we go out and ride the train. Leo wanted to ride the monorail. The monorail ends at Enoshima, so we can ride a bunch of trains and loop back to our house. Usually we walk down to the beach, maybe get a burger atKua`Aina then loop back.

      However, a couple of weeks ago Leo went to the aquarium in Enoshima and it was likely going to be packed being it's a weekend and spring break. Even without the pandemic I'd avoid it. So we took the Enoden to Kamakura. I figured it was also going to be packed, but it was early enough we could avoid the crowds. We walked towards Tsurugaoka-hachimangu as there's a Tully's and I needed a break. But to my surprise it had disappeared!


      We looked at the Sakura and koi for a couple of minutes and headed home. On the way back we saw the Narita Express, one of Leo's favorite trains. He also melted down as he wanted to ride it, but it wasn't at a platform for us to ride. If it was I would have paid the extra fare so we could take it a couple of stations home.
    • I linked to What is the Small Web on the Tanzawa blog, but felt it's worth calling it out on The Week, too. It's made by Small Tech (also worth a click).
    • Β Small Technology are everyday tools for everyday people designed to increase human welfare, not corporate profits.
    Β  Β  Β  Small Tech is exactly the banner to get behind.

    πŸ”—permalink
  • Mar 29, 2021
    by James
    I broke the chain with a weekend off after about 3 months of working on Tanzawa a bit each and everyday. Today I'm back at it and I made a small api that imports images from Wordpress. Tomorrow I should be able to build a small interface that'll loop through the attachments and automatically download them.
    πŸ”—permalink
  • Protocols Not Platforms

    Mar 28, 2021
    by James

    The magic of web 2.0 were the open apis. Developers could use these apis to mashup services how they wanted. Sometimes these developer's tools and mashups became so popular that they would come to define the entire service of which they were building atop. Both hashtags and the term "tweet" originated outside of Twitter, Inc.

    But when these services grew they morphed into platforms. Their apis were closed off and the developers that helped these companies find their success either kicked off or severely limited in what they could do. This became a pattern, not just with Twitter, but many services that found success in thanks part to their open api followed the same playbook.

    Existing players making unpopular changes to their policies is usually a boon for the upstart. Each time this happens a vocal group of users becomes dissatisfied with the platform who then attempt to migrate to an alternative. However each migration causes some kind of loss. Data doesn't transfer or communities fracture because not everybody moves. Not to mention the energy that could have been spent doing something else.

    Contrast this with something like email. You can email anyone you'd like, even if they don't use the same provider as you. If your mail provider changes a policy you don't like, you're free to change providers without losing your identity on the internet. People can still contact you the way they always had and you can still contact them. Your data can move from platform-to-platform seamlessly. There's nothing re-organizing or hiding emails from your inbox unless you setup the rules (or use gmail).

    The difference in experience between twitter and email is night and day. One keeps you locked in and subject to their whims, while the other gives you the choice to use it however you see fit. The difference is that twitter is a platform and email is a protocol. Pick protocols.

    πŸ”—permalink
Previous 147 of 357 Next
Reply by email
Powered by
πŸ”Tanzawa

← An IndieWeb Webring πŸ•ΈπŸ’β†’
Photo of James Van Dyne James Van Dyne Japan

Web developer living in Japan.