Kengo's blog

Technical articles about original projects, JVM, Static Analysis and TypeScript.

Entries from 2015-01-01 to 1 year

(メモ)クラスタ管理関連

etcd KVS Leader/Follower Raft fleet Deploy Service Discovery Hashicorp Consul CP needs several nodes as server per Datacenter each nodes in Datacenter installs Consul agent Hashicorp Serf AP is used by Consul Docker Compose Define set of c…

Guava Release19がそろそろ来そう

現時点でRC2まで出ています。 Release19 · google/guava Wiki · GitHub 個人的に興味深いのはCharMatcherにファクトリメソッドが導入された理由。staticフィールドだとクラス初期化時に初期化されなければならないが、ファクトリメソッドならメソッド実行時…

SLF4Jの使い方をfindbugsで自動検証する

今日、拙作findbugs-slf4jのGitHub Pageを作りました。このブログではこのプロジェクトについて日本語で紹介したいと思います。 概要 拙作PMDプラグインをもとに、2012年8月から実装を開始したfindbugsプラグイン SLF4J利用時のよくあるトラブルを未然に防ぎ…

Mirror repositories for developer in China mainland

In China mainland, default repositories are not so useful because of bad network latency. Instead of them, we should use following mirrors for better productivity. Maven central 开源中国 Maven 库 gem RubyGems 镜像 - 淘宝网 npm 淘宝 NPM 镜像

How I find and learn new technical things

Sometimes my teammates ask me about how to find and learn new technologies. It would be common question for technologist and developers, so I will try to summarise current my theories. How to find new technologies RSS (articles) RSS is sti…

Googleのアサーション用ライブラリTruthを試してみた

Guavaのテストコードを読んでいたらTruthというtesting frameworkが使われていることに気づき、最新の個人プロジェクトで使ってみました。まだアルファ版ですし、自分でも使い続けるかどうか微妙なところですが、試用記録として利点をまとめます。 なお著者…

Is OKR included in MBO?

I've read How Google Works. And now I'm interested in OKR (Objective and Key Results), which is explained in this book. It is really similar to MBO (Management By Objective). I'm learning MBO for five years, and I feel that OKR might give …

How to track state of operand stack by FindBugs 3.0.1

Yesterday I released findbugs-slf4j v1.2.0, which supports more useful analysis based on OpcodeStackDetector. Here I will summarize my problem and solution. What is TOP? Problem is that my detector could not track state of OpcodeStack, bec…

昨今のメソッドの命名方法事情まとめ

一時期はメソッド名は動詞で始まらなければならないと言われていましたが、昨今ではJava標準APIでも動詞ではないメソッド名が散見されます。本エントリではその傾向をまとめます。 of, from(from, of, valueOf, fromString, fromNullable etc.) fromやofは…

JavaのStreamで末尾再帰

JavaのStreamで末尾再帰するというアイデアが今読んでるFunctional Programming in Javaで紹介されていた。 The Pragmatic Bookshelf | Functional Programming in Java agiledeveloper: Functional Programming in Java is quite Approachable 動かしてみた…

CI用語を使わないJenkins入門

Jenkinsの使い方と狙いについて話す機会があるので、自分の考えをまとめる。 時間節約と内容簡素化のため、CIとJenkinsとを分けて説明するのではなく、開発者なら共感できるであろう表現によってJenkinsとCIの双方を説明することを目指す。なお「品質」の定…

How to upgrade Jenkins plugin to support latest LTS (1.596)

Today I've updated my Jenkins plugin, to support latest LTS version. Comparing regression-report-plugin-1.2...regression-report-plugin-1.3 · jenkinsci/regression-report-plugin · GitHub This article will explain what we should do to support…

Gitbook v2.0.0で日本語書籍を書くときの落とし穴と回避策

Gitbookの多言語対応はまだ弱く、日本語で書籍を書く際はいくつか対応が必要です。 しかし文字化け等はないため、Markdownに慣れている人であれば充分に活用できる製品になっていると思います。 文中の意図せぬ空白 文中の改行が空白に変換されてしまうため…

7年働いた時点での私の仕事の極意

最重要 実行に重きを置く やらないで後悔するよりも、やって反省する。 反省は成長を産み生産的だが、後悔は精神の無駄な消費。 時間は有限で貴重な資源だが、たぶん今の段階では行動する前に得るものや結果を予測するのは難しい。 正しい反省の方法とは何か…

The Art of Enbugging

I've read The Art of Enbugging (PDF) by Andy Hunt and Dave Thomas. This is little long, but good article to share your topic with teammate. If you're trying to improve maintainability of your product, it will help your communication. I fee…

When/How to use goog.ui.Component#makeId()

goog.ui.Component#makeId() is a helper function to generate ID for DOM elements. Let's start discussion based on sample component which contains following DOM: <form> <div> <input type="text"> </div> <button type="submit"> </form> To implement createDom() method, we may need to decide ID for each el…