Category Archives: Web

Watching – Writing a Test Framework from Scratch

Building up a simple test runner by example. It’s a great way to explain how the testing framework is doing. The testing framework is relatively simple for most of the scenarios. Learn by doing is a good practice.


Watching – the Changelog #202: 23 Years of Ruby with Matz

The Changelog podcast is interviewing with Matz this week. I had listened many Matz interviews, but this is one of the good ones to intensively covers the origin and early history of ruby. Even now, new languages are keep appearing after years of computing history, and it’s good to know how the languages are born and grow.

Watching – Creating Well-tested Applications in Go @ PluralSight

It was a great course which covers wide range of topics around testing in golang. I once saw some descriptions that golang has very simple verification syntax, and I was assuming that it only has limited testing functionalities. It was wrong and golang comes with various and extensive toolsets for testings.

Among the topics, what I found interesting are,

  • Blackbox Testing
    • “testing/quick” package ( provides utility functions to help with black box testing. It’s kind of property-based testing, which verifies against randomly generated values.
  • Example Testing
    • Examples can be used for both documentation and behavior verification ( It’s kind of doctest with nice StdOut hooking.
  • Performance Profiling

Other languages have similar functionalities, but these ones in golang sounds simple and solid, and I would like to try out.

Elixir + Phoenixframework + Heroku (SpawnViewer Updated)

As an exercise for catching up latest Phoenixframework features, I’ve updated an fairly old heroku app to the latest (v0.4.0 -> v1.1.1) version. It was harder than expected, and leaving some struggle notes here.

  • Basically, the official document ( covers the procedure to deploy phoenix application to heroku.
    • Struggled on the error around missing config/prod.secret.exs which is described in the document.
    • Also, there’re some configuration settings required around config/prod.exs and it seems difficult to apply heroku button with fixed parameters.
    • As phoenix requires node verison >= 5.0, and node_version in phoenix_static_buildpack.config needed to be specified by following the buildpack README description.
  • The controller’s json/2 expects data model which Poison can encode into JSON (changed from JSON data itself). I was using exjsx and needed to change the data accordingly as keyword lists couldn’t be encoded.
  • Reloading pages seems not working on Chrome + Ghostery, and just showing blank. It was confusing for isolating the issues.
  • New asset compilation with Brunch was a difficult for me, as I don’t much experience on JS developments. The js files using global variables (highlight.js) needed to be stored in vendor directory instead of js as in the following document.

Anyway, re-realized upgrading from actively developed v0.x.y framework is very hard…

Watching – Mouseless driven development

Just watched a funny and interesting presentation on mouseless operation of IntelliJ, which was referenced at Fragmented podcast. There’re various good tips introduced for more efficiently operating IntelliJ products.

I love using IntelliJ for JVM-related programming and usually applying keyboard-centric operations, but this presentation realized me that I wasn’t fully utilizing its power. Search and navigation through keyboards are very powerful.

Live Code Update on JVM

Just happened to find the presentation about live code updates on JVM, and was looking around it. I was knowing of the live reloading which some web frameworks provides, but didn’t know about the live updating of the codes while maintaining the state (variables, etc.).

The above presentation at twitter was implementing the dynamic class/method dispatching architecture by introducing additional layers into class hierarchy. It’s interesting approach, but introducing the layers seems to exposing the complexity, especially when states need to be updated or when reflections are involved. If it becomes open-source, it might be worth trying out.

As also noted in the question session in the presentation, the product JRebel seems to provide similar functionality as above. It doesn’t

The related article covers interesting topic too. The dynamically loading new classes can cause hidden chain in the class reference which fails the garbage collector to dispose the unused objects to be maintained in the heap.

Erlang is famous for live-code updating, and will be looking around the differences.

Notes on DNS Root Name Servers

After watching one news about name servers, I just happened to gain certain interests on root name servers, and then I was looking around some documents. I think I knew the basic concepts, but there are many interesting topics around them which I didn’t know.

Normally, we don’t have to care about them much, but it might be one interesting topic to look into. It’s one of the critical component of the Internet anyway.


  • There’re 13 root name servers in the world, and letters from A to M are assigned for each of them. Mostly operated on BIND, but some of them are using NSD.

  • 10 of the 13 root name servers are operated by United States organization, but the physical server location are widely distributed in the world. Also, each of the A to M has many server locations in the world. The following site has a nice map.

  • These root name servers are constantly getting high-load 24/7 (several tens of thousands per second). Decent TLD name servers should access only one in 48 hours, but not always the case.

The monthly average load of all root name servers in September 2007 is more than 118,000 queries per second (90,000 in December 2004) with regular peaks at several times the average which are handled gracefully.This is more than 10 billion (10^10) queries on average every day.

A: Indeed the expected load from well behaved root name server clients is much lower. For each TLD they should only need to query the root name servers about once every 48 hours. In practice the majority of the present load is coming from misconfigured or broken DNS clients.

Learning How to Learn and Pomodoro Technique

I was taking the above coursera course – Learning How to Learn. It was a great course about how to learn effectively, which introduces learning methodologies based on how human brain works. There are various topics covered in the course, but which I started to apply right now is the Pomodoro Technique.

It’s a time management method which uses 25 minutes timer. Wikipedia describes as follows, and also there’re various web sites which covers this topic.

There are five basic steps to implementing the technique:

  1. Decide on the task to be done
  2. Set the pomodoro timer to n minutes (traditionally 25)
  3. Work on the task until the timer rings; record with an x
  4. Take a short break (3–5 minutes)
  5. After four pomodori, take a longer break (15–30 minutes)

I once tried to use more complex time-management system, but failed to keep using them. But this pretty-much simple process of Pomodoro works well. I regularly use todo list for managing daily work, but I sometimes face several issues, like

  • Procrastinate large tasks by starting from small ones.
    It’s easier to close smaller tasks and tends not to do the large or difficult work. Looking at task list, just completing a task drives the motivation, and then results in keep repeating on smaller tasks. Or, just avoid working on tasks and start playing games instead.
  • Feel bad about incomplete tasks at the end of the day.
    Over-time, tasks are piling up and it becomes difficult to complete all the tasks planned for the day. Not feeling well, and also cycle back to focusing on smaller and easier tasks.

Then, with pomodoro,

  • Just start the initial work for large tasks.
    The interesting factor of Pomodoro is structured on the “process” to take limited-and-focused time rather than focusing on “completing” tasks. It’s ok to split a large tasks into smaller ones, and also doesn’t have to feel much pressure on completing tasks on each pomodoro cycle.
  • Feel OK seeing the number of completed Pomodoro along with the todo list.
    It feels a little better to see the daily activities (with graph) based on the amount of time focused in addition to the number of completed tasks.

It’s working well to avoid procrastination. Also, it has similar agile development methodology. Rather than planning for the task completion beforehand, just start with small chunk and run as fast as you can. Then, We can adjust the direction between pomodoro or at the end of the day.

In a longer term, planning process is definitely important, but it can raise the threshold of taking actions. The fear of planning and completion requirement can cause the procrastination. This short period time of sprints and periodical retrospection would be a good approach to maintain the speed of the work.

Microservices and Coming Archtectures

Software Development in the 21st Century by Martin Fowler

Some watching notes of the above talk. Mostly about first-half of the talk. second-half is more conceptual and couldn’t understand enough.

  • [Around 8:00] Microservice concept affects the team structuring. Instead of having technology oriented team structure like UI, Server and DBA, cross technology members can build a team which responsible end-to-end relatively smaller service product.

  • [Around 8:30] The historical SOA (Service Oriented Architecture) is somewhat similar concept as Microservices, but SOA was focusing too much of smartness in the center of communications which leads to complex structures. Instead, Microservice tries to put the small set of smartness in each endpoint. What’s required is the powerful communication channel between endpoints.

  • [Around 12:00] Infrastructure automations are required for managing many services, with continuous integration or green/blue deployment technologies. Without this backbone, Microservice approach will fail.

  • [Around 14:30] What’s the difference between Microservice and SOA? SOA has too broad meaning, and Microservice concept can be considered as useful subset of SOA.

  • [Around 17:00] How big the Microservice should be? Many organizations are reluctant to answer this question straight. Actually, asking how many people are involved in a service results in wide variety of answers. It’s difficult to find one solution, but amazon’s 2 pizza team is a good notion.

Learning computing on MOOCs

There’re so many MOOCs (Massive open online course) lately, and I’ve completed around dozen of them during the past few years. They’re mostly pretty much well structured by the professors from the popular universities.

The above awesome-courses has a great set of courses mainly for computer science field. There’re so many vendors, but what I’m using are

They’re both nice. Then, my favorite courses I joined so far are,

The MOOCs provides good opportunity for learning new field, through the combination of video lecture, exercise, and discussion forum. Even the field I thought I’m already familiar with, trying out a course provides new insights. I love it.