🗻 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
  • The Week #52

    Jul 06, 2021
    by James
    • One year of The Week without missing a single post 🎉. Creating this weekly post got me back into blogging regularly again and gave me an opportunity each week to reflect on life. Initially I thought I'd reference previous posts more, but in practice I don't. One year ago I had just gotten my Apple Watching, helping me start my 4:30-ish wake ups,  just grokking micropub, and running into issues with Wordpress. Now I still wake up at 4:30 (mostly naturally), wrote a micropub server, and ditched Wordpress for a custom blogging engine. What a year.

      If you're trying to start a blog or you have a blog and want to blog regularly, I can't recommend a weekly roundup enough. Keeping the format a simple bullet list makes it easier to write as you don't need a fancy narrative or worry about how to connect the points. You can just write.
    • We booked a weekend trip to Atami for before the Olympics later this month. But with the huge landslide that happened, I don't think we can feel good relaxing when there's search and rescue happening a kilometer away. Hopefully we can reschedule it for a later date.
    • In Covid-19 news this week, Kanagawa prefecture has finally rolled out it's "cancel-waiting" notification system via LINE this week. The idea is when there's a cancellation for a vaccine appointment, they'll contact people who've registered with the system and you can take the appointment with your phone. It helps reduce vaccine wastage.
    • Meanwhile in Edokawa-ku in Tokyo, they delayed sending out the vaccine voucher to foreign residents by an entire week because "we needed to prepare translations". It boggles my mind. Foreigner residents can read Japanese, too? Even if we can't we can figure it out for a week while you prepare documents? 

      Note this also was true for older residents who should already have their vouchers,  but don't because they're not Japanese. If this wasn't for a life saving shot weeks before a massive international sporting event, I'd be a bit more understanding.
    • I fixed a few bugs with Tanzawa and have been getting some good issues opened in the repository that's helping me find issues in my (lack) of documentation. I'm starting to think I need to make a more "formal" documentation, but not quite sure what to use / where to host it yet. The "default" for the Python community is readthedocs (and thereby Sphinx?), but I have yet to look into how to set that all up.
    • I got completely caught up on Trying, a good sitcom about a couple in the UK trying to adopt a child. It's a really good show. And I enjoy the main character's accent. AppleTV+ may not have the quantity of shows that Netflix does, but you can count on quality.
    🔗permalink 1 interaction
  • 🔗 Django & Celery in production

    Jul 05, 2021
    by James
    DjangoCon JP 2021 発表資料

    Djangoで非同期処理を実現するために、よく使われているCelery。ただDjangoほど知見が共有されていないため、なんとなく使っているという方も多いのではないかと思います。そのような場合Celeryを使えるようにするまでは順調でも、実際に運用がはじまったあとに困ることが出てきます。例えば、ログの保存、リトライの設計、デプロイ戦略など。
    このトークでは、CeleryをDjangoプロジェクトで実際に運用するうえでの役立つTipsをお伝えします。
    Some good tips about Celery Production tips from Django Congress 2021 in Nagano this year (I couldn't attend). Most of the information is in the docs in English, but it's handy to see it condensed, even if it's in Japanese. A couple key points:

    • Use **kwargs for your tasks input. This makes it easier to make updates to your tasks once they're already running in production if your input needs to change. 
    • Reminders about all of the handy kwargs you can pass to tasks in regards to retry. Especially handy autoretry_for where you can pass a tuple of exceptions that will cause the task to automatically retry
    1. Tagged with
    2. python
    3. django
    🔗permalink
  • Jul 04, 2021
    by James
    Perfect timing from aaronpk with this Swarm Checkin Import tool. I had been recently thinking about how to import my historical Swarm checkins to my blog so I could build a fun map. Will have to fiddle with this in the next week. Thank you .
    🔗permalink
  • Gathering Requirements for Native Crossposting in Tanzawa

    Jul 04, 2021
    by James
    Ru made a feature request for Tanzawa to be able to syndicate / cross post from Tanzawa to other sites natively. I think it's a great idea and spent some time to collect my thoughts about what that could look like.

    My thoughts were posted on GitHub, but I'm copying them here so I always have a copy and in case people who read my blog but don't follow  the Tanzawa GitHub have any input.

    --- 

    Agreed – being able to syndicate content directly from Tanzawa would be ideal. All syndication is currently manual (it doesn't hurt enough to automate it, yet).

    Base Thoughts 


    If we can figure out what the workflow would look like, I think we can define some base requirements for the feature. A couple of general thoughts about syndication:

    • I don't think posting should be syndicated automatically on publish. There's a couple of reasons for this: 
      • Tanzawa doesn't support any kind of background tasks. Posts that have a bunch of links take a while to complete it tries to send webmentions. Adding more external requests could increase the response time to longer than the request timeout allows quite easily. This is especially true because webmentions require 2 requests per save (before content update and after content update). We could probably process webmentions concurrently to speed this up, but that feels like a bit much at this point? It may be easy with asyncio, but I'd need to research it.
      • When I was posting with Wordpress there was a syndication checkbox (via brid.gy) and found it you'd get errors if you saved twice as the post had already been syndicated. Because there also wasn't a preview, it was always a bit of a gamble for how it would post.
    • Syndication is a separate concern from authoring posts themselves. And as such warrants dedicated screens to make it _right_.  Initially I had thought it might work well to handle syndication via a modal on the edit post page, but the more I think about it, it would box us in.
    • Brid.gy is still super handy for backfeeding likes/replies as webmentions. I still think brid.gy is useful / "required" unless we were to build in some kind of polling mechanism, which is difficult without support for cron/background tasks. ( It could be done "easily" with a django management command, I'm hesitant to introduce undue complexity).
    • "Syndication" feels a bit jargony to me. Is "Cross post" (or something similar)  a better term to use in the interface?
    • Each syndication destination is going to require some kind of settings (API keys, mostly). These can / should be managed via the Django admin?

    Workflow


    Create of  Syndication/Cross Posts

    This is assuming that all syndication can be handled with the same form.

    • Creating a new syndication would happen from the edit post button. The button should be on the meta menu (on the right), below the publish  buttons and only display once the post is published (you can't syndicate a draft).
    • Clicking this button would take you to dedicated syndication page.
    • The top of the page would be a form. The form would display the syndication text and up to 4 photos (with the caption).

      The syndication text is free text and pre-filled with either the post title + link or the first 280 chars of the note. Above the text field itself would be a segmented control (tabs? radio button?) that when clicked would let you toggle between the different presets.

      You may not want to syndicate each photo, so perhaps a checkbox is warranted to let you select which photos will be sent.
    • Finally at the bottom there's some checkboxes for which networks to syndicate to. As you can only syndicate a post once per network, posts that have already been syndicated to would be disabled with text explaining that you've already syndicated to that network for this post.
    • Once syndicated they'd store the url of the syndication and create a TSyndication record.

    Syndication List

    I think we'd want a separate section for syndication, like we do with "Posts / Files" on the left for syndications / cross posts. 

    Clicking that would show you a list of your most recent syndication activity ( syndication destination (link to twitter etc..), syndicated text, link to the related post). 

    Selecting a crosspost would show you a (readonly?) version of the syndication Create form.

    ---

    Does that sound about right? Anything you'd change or we should consider (especially regards to Mastodon,  I don't have an account/haven't used it before).
    🔗permalink
  • TIL: English and GEOS Reference Points Opposite of Each Other

    Jul 02, 2021
    by James
    This post is less a TIL and more of a I knew that and I don't want to forget it again and stems from a bugfix in Tanzawa.

    In English when we refer to a geo-coordinate we usually say it in latitude, longitude order. The reason why we say coordinates in this order is we could measure latitude accurately (via astronomical measurements) before longitude. Frontend mapping libraries like leaflet.js keep this familiar ordering. i.e. plotting points on a map takes a latitude/longitude array and events have a latlng property for referencing points.

    GEOS, the open source geometry library used in most GIS (include GeoDjango) applications doesn't think of points in those terms, but as a graph of x,y coordinates.  As such if you when you're working with data across these boundaries it's important to not mix up your ordering.

    When instantiating a Point it's tempting to just pass in floats directly. But if you do that it's easy to mix up the ordering , so I've started make sure I always use the keyword argument name to reduce mistakes.

    from django.contrib.gis.geos import Point
    
    # Keep our familiar lat/lon ordering without messing up the data point.
    point = Point(y=35.31593281000502, x=139.4700015160363)
    🔗permalink 1 interaction
  • The Week #51

    Jun 29, 2021
    by James
    • A Roller coaster? The Great Crash in 1929? I keep trying to find the right way to describe this week, but I can't. Most everything that was under my control went well. Those that weren't, less so.
    • Japan is handling vaccine distribution in a very measured way. There's basically 3 groups of people getting vaccines right now: the elderly, those with pre-existing conditions, and those that work for large companies. If you are none of those, tough luck. To get a vaccine outside of working for a major company, you need a voucher. My voucher is supposed to come sometime next month, but I won't be able to get an appointment until mid-August at the earliest. Which will have me fully vaccinated my October-ish? Maybe?

      When I posted  that I found a clinic that would give a vaccine to anyone, even without a vaccine I couldn't believe it. I could get fully vaccinated before the Olympics and take back 3 months of 2021. I had an appointment for 30th.

      But then I saw reports that the health authorities found out and told them to start canceling reservations for people outside from outside of the ward. Existing reservations seemed to be fine for a couple of days. Then the health authorities dropped the hammer on them and they've been forced to turn away everything without a voucher and everyone from outside the ward.

      And just like that. Poof. My hope for getting vaccinated this summer vanished. Gutted. Who knows, maybe once I get my golden ticket in a couple of weeks  I'll find a clinic that'll let me get vaccinated earlier. 

      Silver lining is that I found out I'll get turned away at the door before taking the day off work and making an hour-ish trip train ride into Ikebukuro. I also won't ended up being unable to get a second shot or have to make a trip to Ikebukuro to get a stamp on my voucher so I can get a second shot.
    • I joined Leo for his first field trip to Kodomo no kuni ( Kid country?) Check the link, they got all sorts of slides, trains, and so forth. We watched the cows, ran up and down a big hill, and Leo bounced on a white bouncing dome. I definitely want to go back when it's cooler and when we're not with a huge group. I expanded my checkin to a proper blog post, which is something I want to do more often.
    • The issue of Web+DB Press that I wrote an article for is finally release for sale. I haven't gained any new followers or gotten mentions, so I assume people aren't running into any issues following along.
    • Another work update – I was the guest this week on BPZM, an internal company podcast(?) / show. It was fun to shoot the breeze in Japanese. One thing I'd like to get better at is off-the-cuff explanations of things in Japanese without having to stop and think. The largest issue ( I think) is I think of how to explain in, then have to reverse the order of some of the explanation for it work in Japanese and I derail my train of thought.
    • I'm trying to focus less on each day and more on the week. I'm not sure if it's helping, but I did manage to run twice this week. Compared to the previous weeks (months) of 0 runs, it's a vast improvement. Yay me.
    🔗permalink 2 interactions
  • Checkin to Kodomo no Kuni (こどもの国)

    Kodomo no Kuni (こどもの国) 35.56040842396944 139.487338003306
    Jun 28, 2021
    by James
    in Yokohama, Kanagawa, Japan
    We went on Leo's first "ensoku" (field trip) with his pre-school. Originally we were supposed to go to the beach, but with covid-19 they don't want people going to the beaches, so we had it at Kodomo no Kuni instead.

    Kodomo no Kuni is this huge park in Yokohama close to Tokyo. Inside they've got some huge jungle gyms, different pedal-powered rides, a full-on dairy farm and heaps of open space to run and explore in. You can buy the milk (to drink on the spot) and soft-serve, which I believe comes from the cows (they have a dairy farm, so it would make sense).

    Since we were with a big group, we just played in this huge field / hill and went and saw the cows. The cows are a major attraction, so much so that the train that comes to Kodomo no Kuni is cow themed.

    Next time I want to go by the cow-themed train!

    The field and huge ground that we played


    The view from the top of the hill. The white domes are bouncy.


    The cows taking a rest
    🔗permalink 8 interactions
  • Jun 27, 2021
    by James
    Enoden Monaka. Love the packaging of these. The classic style tickets are great.

    Enoden Monaka
    🔗permalink
  • 🔗 Newsstand

    Jun 26, 2021
    by James
    Google News RSS reader for Mac OS 9 More than 200 curated topics Top news available for 24 countries Designed with an Apple Platinum interface Natively written in Mac OS 9
    The world needs more software like this. So clean and with minimal system requirements. Lovely.
    1. Tagged with
    2. macos
    3. computing
    🔗permalink
  • Checkin to SOTETSU GOODS STORE 二俣川

    SOTETSU GOODS STORE 二俣川 35.46294384340541 139.5316490290749
    Jun 26, 2021
    by James
    in Yokohama, Kanagawa, Japan
    そうニャン❤️
    🔗permalink 3 interactions
Previous 136 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.