The First Cry of Atom

Bitshift to 64 bit in Java

Bitwise operation sometimes looks like magic. There is a bunch of sophisticated techniques to manipulate the value at the bit level. Bit shift operation is one of these operations. You can shift the bit sequence of the given value by using shift operators which are commonly described as >> or << in many programming languages. But do ... Read more

How to construct LL(1) grammar of arithmetic operations

While I read a compiler book, I have struggled to understand the reason why the arithmetic operations are expressed as follows. add = mul add' add' = ε add' = "+" mul add' add' = "-" mul add' mul = term mul' mul = ε mul' = "*" term mul' mul' = "/" term mul' term = <num> term = "(" add ")" That must be easy to understand those who are ... Read more

Idempotency key in the Stripe Ruby SDK

A system may fail anytime even while doing something should not fail. The common pattern to recover that sort of failure is retrying. While retrying is simple, it’s a powerful way to make a system reliable and worth considering. Actually, many operations across the network which can fail temporarily are able to be recovered by retrying. But here... Read more

Protect Your Application by AWS WAF

Have you ever heard about WAF before? You may but no, it’s not web application FRAMEWORK I’m going to talk about today. It’s web application FIREWALL. You may have a time when you struggle to deal with many accesses from scrapers or attackers to your web application. These requests look normal but a loaf of requests that keeps coming can behave ... Read more

Coloring jq with less command

JQ is one of the best tools I frequently use. One good thing of jq is that it automatically print the JSON in pretty format with fine coloring. So I often use JQ command just for printing JSON in a pretty manner. But this coloring can be disappeared when using a pipe to other commands such as less. $ cat sample.json | jq . | less This is the... Read more