Category Archives: products

Be Careful with Not

One thing that I like with ruby is it have a lot of English sounding keywords: not, and, or, unless, etc. However, you should be aware that these keyword might not be equivalent with their “traditional” counterpart.

Take `not` for example. We use `not` to negate a boolean, which we traditionally use bang (!) for. However, not has different precedence level from `!`. In ruby, `!` has the highest precedence, while not has one of the lowest precedence, like you can see in the ruby docs. This might have surprising effect.

!true && false
=> false
 
not true && false
=> true

In the first example, ! has higher precedence than `&&`, so it will evaluates as `(!true) && false`. However in the second example `not` has lower precedence than `&&`, so it will evaluates as `not(true && false)`.

Another example

a = true
b = not a
SyntaxError
 
b = !a
=> true

Because of this subtle difference, I avoid using not and just use ! every time.

Sources:
https://github.com/bbatsov/ruby-style-guide#bang-not-not
http://stackoverflow.com/questions/27429711/can-someone-explain-not-vs-in-ruby

My 2017 Goal: One Product Every Other Month

Okay, I have finally decided to do this. I am going to launch a product once every two months.

This all started when I read the post by Pieter Levels here. And I say, hmm.. not such a bad idea. But let’s not be so rad and do six instead of 12 a year.

But why? Several reasons:
1. It forces me to ship my ideas. I always getting some ideas about what would make a great product. With the constraint of shipping every other month, I have to pick some of those ideas and see if they are really as good as I thought
2. It will improve my technical capabilities, since I will build the products mostly by myself.
3. It will bring some products that hopefully can make some people life a little bit better.
4. It is going to be fun.

While I do have rough ideas of what I am going to build, they all are not finalized yet (except for the first product, which already in use by me). However they all are going to have these characteristics:
1. They are going to be small, you can’t build a facebook in two months right?
2. They will be a paid product, meaning they will get their revenue directly from their user, no “monetization” scheme
3. They will neither be designed nor executed to have neck-breaking growth

Ok, That’s it. I am going to do this. This post will be updated with every product that I launch. Want to join me?