• Lately I've been thinking I want a way to post comments on other sites from my site without putting them into my main feed. I could pull it off with just unlisted posts...but I'm not sure if that's a robust enough solution...will have to ponder some more.
  • Response to My weekday coffee routine

    I have asked a few people lately when they drink coffee. I am interested in this because I understand that we all drink coffee at different times, in different quantities, and in different contexts. I want to learn more about how others consume coffee.
    I'll indulge in talking about my coffee habit. The method that I brew coffee has changed over the years.  In college I used either a hand-drip, a french press, or at times a peculator

    My standard method was a hand-drip until my son was born. Then taking the 15 minutes in the morning to brew a cup of coffee became too time consuming. Especially when I wanted more than 2 cups in a go. 

    These days I use a Cuisenart Automatic Grind and Brew. It has storage for beans on top and a built in bur-grinder. The carafe is also insulated so it doesn’t burn the coffee keeping it warm.

    My first cup is usually around 5am with breakfast (slice of thick toast with peanut butter and banana). Second cup is shortly there after. 

    Around 8 when I start work I’ll have my third cup. This one is kinda sipped over the course of an hour or so.

    I try not to drink coffee in the afternoons. But sometimes I feel like a candy coffee after lunch. Those times I’ll have a instant cafe latte.

    One thing I haven’t done in the past 18 months is go out for a nice coffee at a specialty shop. I’ve got to Starbucks, but I miss the hand brews ala Blue Bottle sometimes.
  • 🔗 Reaching people on the internet in 2021 - The Oatmeal

    A comic about social networks.
    Fantastic comic from the oatmeal about reaching people on the internet. I don't have a mailing list, but I feel the pain – hence Tanzawa.

    Reaching People on the Internet
    1. Tagged with
    2. internet
    3. social media
    4. indieweb
  • The Week #53

    • This week I’m mostly writing in a retrospective, rather than bit-by-bit throughout the week. It’s proving harder than I had anticipated.
    • Blake shared a link to fireworks adverts from a Japanese company in the 1880’s in the US.  I love the colors so much. Ads of this period are always interesting. Humans haven’t changed as much as we’d like to think.
    • Leo got sick for the first time in as long as I can remember. It just a cough, but we decided to pull him from pre-school for a day so he could visit the doctor and not spread it to other kids. His cough woke up him a couple of times at night, which in turn woke me up, so I'll need a bit more coffee to power through the day.
    • We went to Afternoon Tea in Fujisawa for the first time in ages with Leo for tea (well, I always get coffee/iced coffee). I was totally surprised how well Leo did. He managed to wait patiently for 20 minutes (!) while we waited for a table. He also waited patiently for our scones to come. Achievement unlocked?!
    • I built a little robot out of paper-straws with Leo (well, really he just watched). It was from a little kit made for elementary school students. His name is aru-kun after the Japanese for walk "aruku".
      Arukun
  • I've started working on post visibility support in Tanzawa. It's the first big feature I've worked on in a while. Also a great opportunity for me to up test coverage to make sure visibility is consistent between RSS/Feeds/Streams/Micropub.

    Adding post visibility support
  • The Week #52

    • 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.
  • 🔗 Django & Celery in production

    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
  • 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 .
  • Gathering Requirements for Native Crossposting in Tanzawa

    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).
  • TIL: English and GEOS Reference Points Opposite of Each Other

    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)
Previous 137 of 359 Next