aldiantoro nugroho. @kriwil. indonesia. part-time programmer. full-time dreamer. swift. elm. linux. ubuntu. python. django. vim. indiana pacers. manchester united. random.

  1. Colemak

    I've always wanted to type correctly. By that I mean touch-typing using 10 fingers and with finger on the right position. I got the touch-typing part nailed pretty good. The 10 fingers? Sort of. I'm pretty sure I'm using all my 10 fingers to type. Do I use it correctly? Now that's the concern. I don't think I do. And it's hard to change the habbit.

    I figured, if I wanted to change the habbit, I might as well learn new layout. Partly because I felt the muscle memory is easier to change if I learn new layout, partly because I just wanted it for the sake of it. I picked Colemak, because most of the GUI shortcuts (like ctrl+c, ctrl+v, you know, 2 most important shortcuts for progammer) stays on the same position (as in qwerty). So I changed my layout in OS level and started the journey. I put this image on my second monitor as cheatsheet. I also printed the image and put it next to my keyboard.

    colemak layout on hhkb

    I made a note about it on the first day, second day, and after a week. My firt day was on May 22, 2017.

    Day 1 was painful. My typing speed was probably 3-4 WPM. My second monitor was practically used to display the keyboard layout. Also, I had to switch between QWERTY and Colemak otherwise I won't be able to work at all.

    Day 2 was probably the same. My brain could figure out the key position, but my muscle couldn't. Could've been much better if I didn't switch back and forth. Alas, work needed to happen.

    Day 8. 22 WPM. That's an improvement. I realized something. A lot of shell commands I do come from muscle memory instead of remembering the command. So I kept hitting cd at the qwerty position. Also, I've been typing cd using the wrong finger the whole time.

    After that, the improvement is gradual. I think stopped switching back to qwerty after day 8. I was never a fast typer, so I don't really care about my WPM. Now, after more than 6 months, I feel I'm using my fingers correctly. Having an ortholinear split keyboard helps too, but that's another story for another time.

    So, answering the question you have, if you're using qwerty layout, should you learn new layout? The answer, IMO, is always no if you don't have any problem with it. If you have pain from moving you fingers, or you just want new challenge, go for it. It's fun.

    — – —
  2. Camel-case JSON Renderer for Django REST Framework

    Because I'm too lazy to create python package for this. Just use it.

    Django REST framework version: 3.5.x

    — – —
  3. Auto-publish pelican blog to S3 using CircleCI

    While having blog powered by pelican is great (because it's fast), creating new post isn't really fun. There are more than one step to do it:

    1. writing the actual post
    2. upload to the server (in this case, S3)

    If you're on new machine, it's even more painful:

    1. clone the repository
    2. install pelican's requirements
    3. setup S3 credential
    4. write the actual post
    5. upload to the server

    CircleCi has given free tier for a while now. So I figured, since I'm using github for my blog content, I could use it's free continous integration & delivery service to publish my blog easily.

    I found a blog post that gives instruction to do that, but apparently it doesn't work. s3cmd couldn't get the access key ID and secret access key I set. Since CircleCi has awscli preinstalled, it's better to use that one instead. Pelican doesn't support awscli yet, so there's some steps need to be done to use that.

    1. update your Makefile to use awscli instead
    2. insert your AWS S3 access key ID, and secret key ID
    3. create circle.yml in your repository

    Here's how the circle.yml should be:

        - pip install -r requirements.txt
        - echo -e "[default] \naccess_key = $S3CFG_ACCESS_KEY \nsecret_key = $S3CFG_SECRET_KEY \n" > /home/ubuntu/.s3cfg
        - echo "test"
        branch: master
          - make html
          - make s3_upload

    Now, everytime you push your commits to master, CircleCI will deploy them to S3. You should be able to see the deployment progress on you CircleCI dashboard.

    You don't need to create special environment to install pelican etc, just git and text-editor. You could even use github's feature to create blog post directly inside your browser (I wrote this using that!).

    new post via github

    — – —
  4. Windows 10


    It's been two weeks since I'm using Windows 10 for work, so I guess I could say something about it.

    I've been wanting to try to do (web) development on Windows for a while. I know this is weird, and sounds backward. But with Bash on Ubuntu on Windows, I had high hopes that I could finally have gaming machine and could still do development on it.

    The main reason I finally did this is I need to fix my work on IE/Edge. I usually use BrowserStack for testing IE (I still do), but it's very painful to use it for a long period of time. It requires a good upload connection, and in Indonesia, "good" and "upload connection" don't go together in one sentence. So when I had a hard drive lying around, I decided that it's finally the time to install Windows 10. I won't go to OS installation details, you'll find those kind of things easily in other places.

    The first thing I tried after installing Windows is that bash-thing. I was so exited that I could finally use real shell on Windows. Well it works. Sort of. It's slow, and other than running some shell commands, it doesn't do much. I can't even access the server I created using python -m SimpleHTTPServer command. Probably I need to do some magic thing first. But it doesn't work when I tried it, and I was disappointed.

    Once I found out I can't access that simple HTTP server, I didn't even bother to try full python web development setup. I immediately downloaded VirtualBox and Vagrant and setup the environment there. Maybe I should write another post focusing on development setup on Windows.

    There aren't many things I missed when working on Windows. My daily applications usages revolve around browser, IDE, terminal, todo manager, email client, notes taking application. From those list, I miss terminal and todo manager.

    Even I mainly use Safari, I do use Chrome for development, so that's not a problem. And with Chrome's sync, I don't even see any difference. All the bookmarks and extensions are there. I do miss 1password's auto fill, and sometimes it hits me hard.

    Powerful terminal (and shell) is probably the main reason why development on linux or OSX is better if you're not developing for Windows platform. Yes Windows now have PowerShell, and yes maybe it's good, but I doubt it's better.

    Now, the good thing about Windows. Steam. Games on Steam to be exact. Yes you could install Steam on linux or OSX, but there are lots of games that only work on Windows. And I've been enjoying games again. I don't always play games, but it's nice to have them ready when I want to.

    So, yeah, I guess Windows will mainly be a gaming system for me. I still hope the bash will works flawlessly in the future. In fact, I just turned the Insider Preview on so I could get faster updates, hoping there are more updates to the bash.

    I'm writing this on Windows, and will build this on bash (I'm using pelican), so if you see this paragraph, it means it's a success.

    — – —
  5. PC Build Update

    Thanks to some dude, I remember I need to post an update for my PC build.

    Since that post, I've gradually uppgrade some parts of the PC. I've increased the RAM to 12GB (8GB + 4GB RAM — now I have one 4GB RAM stick lying around. Want to buy? email me!). I also add Samsung EVO 250GB SSD (for OS) and 500GB Seagate drive (for backup). Somehow The water cooling system suddenly stopped working so I had it replaced with original heat sink, but I replaced the fan with Noctua NH L9I to keep it silent. I also added APC Pro 550 for UPS because electricity in Indonesia isn't that good.

    One think I regret from the build was the small case. I should've bought bigger one since now I don't have many GPU choices to go with the case. I don't have any plan to upgrade it now, but it'll be nice to have options for VR-ready GPU at somepoint in the future.

    — – —