-
Checkin to Starbucks
by in Kanagawa, Japan -
Checkin to Ootoya (ε€§ζΈε±)
-
π Izumicho, Kanagawa, Japan Air Pollution: Real-time Air Quality Index
byHow 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!- Tagged with
- japan
- air quality
- pollution
-
byI 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. -
The Week #38
by- 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.