• Checkin to TGオクトパスエナジー株式会社

    in Chuo, Tokyo, Japan
    At the office.
    Fancy Enteance
  • Response to Guide on UI customisation · Issue #83 · jamesvandyne/tanzawa

    I'd donate to you for a theme decoupling. This is high on my list! :)
    I appreciate the sentiment 😃. It's not money that's preventing me, it's time.

    I've been thinking about how to handle theming for Tanzawa properly. It's a big task, but not impossible. There's 2 different ways to think of theming: 1) css only changes theme support, 2) complete theme support (i.e. colors and layout). The move from css only changes wouldn't be much less work than allowing full customization.

    Roughly here's what I think would be required:

    • Extract all mentions of tailwind colors from templates/public (e.g. bg-negroni-700 ) and replace them with a common name – perhaps role based?
    • Create a record / setting somewhere ( django-admin?) to track the active theme.
    • Create a custom template loader (or other shim) that will prioritize rendering with the selected theme's public themes.
    • Set Tanzawa to only include the css of the selected theme.
    • Document how to make a custom theme.

    Theming isn't my top priority, but it's not low either. If anyone is interested helping before I have a chance to get to it, I'm happy to answer questions / provide direction and so forth.  
  • Technology I Use

    Inspired by James, I'll chime in with the technology I use. Most of it is a few years old at best.

    Computer Setup

    My main computer is a mid-2014 15" Macbook Pro with a 2.8Ghz Intel i7 CPU, 16GB ram, and 512GB SSD hard drive. It got a fresh battery back in January so it should be good for another few more years.

    I do feel the limits of it occasionally, but not often. As it's been a while since I've gotten a new computer, I am getting the urge to replace or augment it. If I replace it outright, it would probably be with another Mac, Thinkpad, or a Frame.work.

    If I were to replace it with a desktop, it would probably be a used Mini PC coming off lease from some business. But since I mostly use my personal laptop from the kitchen table (not my home office), I'd need to remote into the desktop most of the time. But I'm not sure I'd do that.

    Home Server

    I have a 2012 MacMini with 16GB of ram acting as a home media server. I got it from my brother and the clips that hold the ram in are broken / missing (I have no idea how). So it's using a broken cd-r (as is how I received it) to create pressure to keep them in place.

    This server also runs mac OS and is hooked up to my ScanSnap and a Drobo with  14TB of storage. Since it redundant, only half is actually usable. As is, it'ss fairly under-utilized with just Plex and iTunes. Maybe spending time on r/SelfHosting could improve that. If I were to get a new Mini computer, it would likely be replacing both my laptop and my home server.


    Work Setup

    I've been working remotely / working from home for all but 2 years of the past decade. I've always kept my work setup separate from my home setup in that period. Currently my work computers are provided by my employer and they're generally the latest MacBookPro that's refreshed every 3 years.
    • Keyboard: Happy Hacking Lite2 USB with a US layout
    • Headphones: Airpods on mobile.  Sony MDR7506 Professional Large Diaphragm at my desk.
    • Mouse: Magic Trackpad and a random Microsoft Optical mouse
    • Webcam/Microphone: Built in. (I really should upgrade this)
    • Monitor: Dell U2720QM 27 inch 4K


    Software

    • Operating System: macOS Catalina at home, BigSur at work. Ubuntu on my servers.
    • Browsers: Firefox
    • Terminal: Terminal.app / iTerm2
    • Code Editor: PyCharm / emacs
    • Music: Plex / YouTube

    Phone

    iPhone XR (Yellow, 64GB)

    Watch

    Apple Watch (Series 5)

    Site Technology

    This site is powered by Tanzawa, an open source blogging engine I started building about a year ago. Tanzawa is built with Python/Django with a splashes of Javascript (Stimulus) for the maps. Mapping is powered by Leaflet.js.
  • I don't follow YCombinator investments (though I spend too much time on HN), but the first company on Demo Day is a company meant to increase production of oil & gas wells. The exact opposite of what we should be doing right now. Disappointing.
  • Response to Are we there yet?

    Leon Paternoster wrote of the IndieWeb:

    "I’m nearly convinced that the possibility of a decentralised network of websites talking to each other through comments sections and pingbacks (known as the web) has probably passed."

    Colin wrote:

    "WordPress may have all of the building blocks available but it's still not native. Plugins, themes, tweaks to get just so and working properly. Micro.blog is the closest we have but it's still a platform with its own way of doing things."
    I agree with Leon and Colin. There's a lot to unpack in both of these posts and I agree with all of it. But I'll chime in my 2.2 yen anyways.

    The masses aren't going to adopt their own websites instead of visiting and posting on one of the large social networks. That's a feature, not a bug.

    An interconnected IndieWeb the size of Twitter would present each user with the opportunity to filter and moderate the dregs of internet. That's something I'm not interested in and I doubt many on the IndieWeb today would be either.

    The utility of the IndieWeb technology is that it helps us find and connect to like minded people in a decentralized matter. But still, discovery is still not solved. Without micro.blog (and perhaps the IndieWeb WebRing ) we'd all be blogging alone. And without the IndieWeb community, I'm not sure if I'd even be blogging, let alone building my own engine.

    We should do everything we can to lower the barrier of entry to participate in the IndieWeb. Getting started with Wordpress is confusing because, as Colin says, it's not native. There's Wordpress Post Kinds and there's IndieWeb Post Kinds. How do they interact? Why's there two? You need to select one of a couple of microformatted themes and hope you don't break the formats if you try to customize it. Plugins conflict and break randomly (more of a general Wordpress issue). Data's stored in opaque formats (do you own the data if you can't really re-use it?).

    The standards for UX have risen a lot over the past decade. Being able to participate with a single click in software that is native to the IndieWeb is table-stakes for growing the community beyond it's current size or rate. And it needs to be hosted, because most people aren't capable of or have interest in maintaining their own server.

    That hooks into my dilemma with Tanzawa. My goal is to make an IndieWeb native blogging engine that's easy to use is achievable. Provide people with clean apis and transparent / logical data formats so they can use their data how they want. I can do that. I'll get there one step at a time.

    But hosting? I want people to use my software, but I'm not sure I want to start a niche hosting company just to improve the UX of being on the IndieWeb.
  • Still a bit of a work in progress, but I think I've got the Trip list page sorted. Clicking on the title or the map takes you to trip detail page. Also introducing my first top nav link 😱
    Trips list page
  • How to Handle Pluralization and Internationalization in Django Templates

    This is written in the docs, but it was a first time for me to handle. Your templates can start to get very verbose when you really start supporting i18n support. 

    For strings directly in your templates you can use the blocktrans plural tag. ( Note this changes a bit with Django 3.2, blocktrans becomes blocktranslate ).

    {% load i18n %}
    {% blocktrans count counter=object_list|length %}
    {{ object_list }}件
    {% plural %}
    {{ object_list }}件
    {% endblocktrans %}

    For master data that has a dedicated DB column, you can use the get_language_code from the i18n package.

    {% get_current_language as LANGUAGE_CODE %}
    {% if LANGUAGE_CODE != "en" %}
        {{ my_model.foo }}
    {% else %}
        {{ my_model.foo_en }}
    {% endif %}
  • Bookmark of koaning.io: My New Home Setup

    Better Patterns for Development Work.
    Despite my undying love for my mid-2014, I've been itching for a new computer for the better part of a year. I really like this idea that Vincent has setup working: a beefy Intel NUC PC running Linux to handle Docker etc.. and uses VSCode to develop on it from his Mac.

    I've heard of people doing this before, but they're usually using a terminal for all of their development on a server in the cloud.

    While I'm reluctant to use VSCode (because I'm still not sure I trust Microsoft yet), it appears a similar can also be done with PyCharm. Maybe this is the solution to my building a PC/getting a PC itch.
  • Why I'm Joining Octopus Energy 🐙

    A bit over 4 years ago I moved back to Japan, without a stable job. I had been contracting for 3 or 4 years in the US, but a difference in time zones (GMT+9 vs GMT - 4) made that difficult to maintain. I had heard about a Python shop called BeProud and they were remote friendly.

    There weren't many remote friendly companies at the time in Japan, let alone companies that specialized in Python consulting. Being full-remote friendly signaled to me that they'd have a progressive company culture where I'd fit.

    It was a fun just over 4 years, my longest tenure to date. My co-workers were great, bosses nice, and the projects (mostly) fun. Work-life balance is taken seriously (I took 6-weeks of (paid) parental leave after my son was born without any issues – something that's still rare in Japan).

    If you can speak Japanese and sling Python, they're a great company filled with great people.

    So why leave?

    Climate change. Like many, for years I've worried about climate change. But I didn't know where to begin, beyond voting for people that take it seriously and reduce flights/driving where possible. But the challenge is bigger than any individual.

    The most important change society is going to need to make is is getting our emissions to net zero. As fast as we can. And the biggest leaver is changing how we power (⚡️) our society. Japan currently gets 69% of its electricity from fossil fuels. Any way I can help lower this number, beyond just changing my personal electricity, is something worth spending my time and effort doing.

    Per capita electricity from fossil fuels, nuclear, and renewables, 2020


    Like many, while I am worried about climate change and want to help, each time I looked for how I could get involved in non-superficial ways it either required engineering or chemistry expertise that I don't have or in the wrong location or some other  factor that didn't line up. Until now.

    Octopus Energy, one of Europe's largest investors in renewable energy, is a working to make a "green dent in the universe".  They do this in a number of ways:

    1. As an electricity provider, they offer dynamic tariffs that move with the wholesale price of electricity. Using data science and machine learning, they then help their customers take advantage of renewables by increasing electricity usage when there's an abundance of energy on the grid (which is usually when there's a lot of renewables producing  electricity) and reduce usage when there's less abundance (and usually dirtier, fossil fuels).
    2. They're generating their own green electricity that they put on the grid.
    3. They sell and service electric vehicles
    4. They're making green-Hydrogen as a service.

    The system that powers all of this is called Kraken and they're bringing it to the US, Australia, and Japan (in partnership with Tokyo Gas), allowing customers to take advantage of cheap green energy and reduce demand when it's mostly fossil fuels. 

    Starting in October, I'll  be working on the integrations that allow  Kraken to be used in Japan and helping de-carbonize Japan's electricity supply. Hopefully over the coming years this 69% will decrease.With any luck, my work will directly contribute to driving that number to 0% as quick as possible.

    While I'm sad to leave BeProud and co-workers I enjoyed working for and with, the opportunity to use my skills to fight climate change in a meaningful way is not one that I could pass up. To my new co-workers, I look forward to working together to make our green dent.
  • The Framework laptop, a laptop designed to be upgraded and repaired has shipped. I really want one as I love the idea of being able to fix my computer again. The two things that give me pause are the hot/loud mess that is Intel (compared to the M1) and jumping to desktop linux (which doesn't have the experience I'm used to on my Mac). 🤔
1 of 8 Next