First subject badge!

grailsTagBronzeBadge

On StackOverflow, Subject badge is always rare, especially if you work on a niche of technology.

Fecilitation!

Posted in Technology | Tagged , , | Leave a comment

Model is model – a quick draft

A sample of business model

Model is model, nothing more, nothing less.

Recently when I take a course about Corporate Strategy, I learn about various strategic diagrams. BCG1, BCG2, Life cycle diagrams… there are a lot of them.

Many of my classmates wonder why we must do this/that by a different way. Why we calculate relative market share based on relative comparison with the market leader; but for market leader, we compare with the second-follower?… Many questions, but the reason for all the confusion is that they are put down as “unquestionable reality” and are not easily explained by logic or mathematics.

So I feel the urge to note down a few things:

1. Models don’t decide reality. None of them does. So, if the BCG doesn’t fit your organization situation, feel free to drop it. Forget the classes and the lectures, they only give you the tools. What we really need is the model mindset – a method to use that powerful tool.

2. Models are made to reflect & simplify the world. They are used to explore ideas & explain knowledge. They help us make clearer thinking and focus on specific aspects of the reality. There are models all around us. From the map of a city, to the schedule calendar, or a quick draft of a painter… they are all models. They are not reality in its full sense: they reflects reality, with the focus on what we care about.

Let’s take the Hochiminh city map as an example. In a map, we don’t describe a city. We don’t show that the Ben Thanh Market is painted with yellow color, or The Palace of Independence is covered by a beautiful garden. What we really care about: they are streets & their directions, how to move from 1 point to another. So the map is made with only lines & dots, & symbols, to help you traveling.

The same applies for the BCG matrix. The real business environment is complex, so that people must come up with some simplification to get the direction. It doesn’t mean we must always drop the dog and feed the star. For some cases, if cleverly handled, a dog SBU can be positioned in a niche market and bring profits without much investment (becoming cash cow), while some stars must be dropped for gathering enough money to invest in 1-2 best stars.

Ok, so, BCG model means that in most cases, dropping the ineffecient SBUs is a good idea, so that we could save money for others. Damn, we can understand it without BCG, it’s normal logic. So why we need BCG? Because it’s too simple, easy to remember & understand. That’s all.

Therefore, please don’t get the model for itself, but understand it, and apply to the situation.

Posted in Thoughts | Tagged , , | Leave a comment

Shiseido – and Japan philosophy of service

Little Omotenashi photo little-omotenashi_zpsb24a009a.jpgOmotenashi

The highest form of hospitality is Omotenashi. In summary, it’s “the host anticipates the needs of the guest in advance and offers a pleasant service that guests don’t expect.”

Coming from a pharmacy, to a leading cosmetics vendors in the world economy, is not simple. However, Shiseido did it.

I will not go further into the analysis how a small pharmacy can grow to a company, and how an Asian organization can succeed in such a competitive market, where Western companies have lots of technology advantages. There are quite a few reasons: the timing, the technologies, marketing… and so on.  Just forget them for now. The only thing that makes Shiseido special, in my view, is the reason for that the company exists.

Shiseido is built on the philosophy of Omotenashi.

Omotenashi photo japanesegirl_zpsb9b6cc23.jpg

Omotenashi: The word ‘Omotenashi’ in Japanese comes from omote (surface) and nashi (less), which means “single-hearted”, and also mote (carry) and nashi (accomplish), which means “to achieve”. Therefore, Omotenashi has two meanings, which include offering a service without expectation of any returned favour, and the ability to actualise that idea into an action.

Don’t take the word, look into their action:

Only in the Mirai-Tsubaki 2012 project, Shiseido sent out 45,800 employees to do 131 social welfare activities throughout the world. They build schools, give books to students, promoting good traffic behaviors, send cosmetics (yep) to victims of the Japan earthquake 2011, training handicapped women in Vietnam, planting trees, developing natural-friendly cosmetics, recycling drugs,… And they do it all when the financial situation is going down.

Shiseido considers the most beautiful skin is the natural skin. It believes that the skin itself can’t be good without the well-being of the whole person, the harmony of both body and mind. The true beauty doesn’t come from the skin itself, but come from the caring, empathy of the people. I remember a story, when a young American girl comes to cosmetics store for a make-up. The consultant tells her: “you are young, and your skin is beautiful already. You don’t need any make-ups. Instead, you should learn how to take care of your skin, so that it will be always beautiful.”

That’s how an organization can LAST.

Posted in Technology | Tagged , , , , | Leave a comment

Never use “reserved keyword” as column name

The title says it all. Never EVER use the reserved keyword of a database system for a column name. You will meet problems that cost lots of time (which isn’t worth at all!)

If someone tells you about this little trick:

<hibernate-mapping>
    <class name="long.model.User" table="USER">
        <cache usage="read-write"/>
        <id name="id" column="ID">
            <generator class="sequence">
                <param name="sequence">user_seq</param>
            </generator>
        </id>

        <property name="position" column="&quot;POSITION&quot;"/>
    </class>
</hibernate-mapping>

Then just kick him in the ass! Why we should use something as dirty as “"”?

If you still not believe, take the example above, then try to UPDATE the position of a random user.

As you may guess:

UPDATE public.user set position = 'MANAGER'; // NOT WORK 
UPDATE public.user set 'position' = 'MANAGER'; // NOT WORK 
UPDATE public.user u set u.'position' = 'MANAGER'; // NOT WORK AGAIN 
UPDATE public.user u set u.POSITION = 'MANAGER'; // NOT WORK! 

…..

Here’s what you MUST do if already get fallen into the trap

UPDATE public.user set "POSITION" = "MANAGER"; // WORK! Windows only 
UPDATE public.user set "POSITION" = 'MANAGER'; // WORK! only Linux 

Hence don’t try to trick the system. Curiosity is good, but you might need to pay for it by several hours playing with how Postgresql deal with case-sensitive name. Nice to find out, but either way, it isn’t a portable database script.

Posted in Technology | Tagged , , | Leave a comment

Temporarily disable Second level cache in Hibernate

Just a quick note: another way to avoid cascading-delete problem when maintaining bad legacy code (yes, it’s dirty).

Session session = sessionFactory.getCurrentSession();
session.setCacheMode(CacheMode.IGNORE);
Posted in Java, Spring Framework | Tagged , , | Leave a comment

[Duolingo Introduction] Part 1: From Captcha to Digitalizing the books

duolingo_owl

Duolingo is a startup that focus on language-learning. And it’s a nice one.

Being constructed by the founder of Re-captcha, Duolingo also shares the vision of utilizing the power of community to make the world better. So, before the story of Duolingo, I’ll tell you the tale about how  Luis von Ahn creates Recaptcha.

recaptcha-exampleHave you even registered in any website? Did you see little words that you must type to prove that you are not a auto-robot? “If you type the weird words in the images right, you may get in”. If you saw it, you know what a Captcha is. It’s a simple mechanism – based on the fact that no matter how far technology goes, it’s still nearly impossible for a machine to tell a bad writing from random images with thousands of senseless dots.

Ok, but have you ever asked yourself, why sometimes, you must type 2 words instead of 1?

The reason is simple. When Luis sees that we all must type Captchas everyday, he wants to make it more useful.  He told himself: we still have lots of books/ materials in paper form. If we scan them, they still be in pure image form – we won’t be able to search them like a text ebook. The current technology doesn’t allow machine to translate from image to text accurately. But what if people can help in the process?

So Recaptcha was born. Among 2 word-images Recaptcha gives you, it only knows exactly 1 word. If you type that word right, Recaptcha will recognize you as a human and let you in. And yes! Because you type one word right, the second word should be right too! You just translate an image to a word!

missing you

The result is that a lot of books in Google Scholar is digitalized that way.

Posted in Technology, Thoughts | Tagged , | Leave a comment

ibus-bogo – New replacement for Vietnamese Keyboard on Ubuntu!

/** Vietnamese: Tin tốt cho người sử dụng Ubuntu ở Việt Nam – ibus-bogo – một bộ gõ mới, ít lỗi & gõ mượt hơn nhiều so với những bộ gõ cũ. **/

Good news for Vietnamese Ubuntu user! Nguyen Ha Duong is a good guy, and he writes quite a good software!

No more advertising. Let’s try it at https://gist.github.com/BoGoEngine/ibus-bogo-python/downloads . It’s version 0.2 now.

This is one among the projects at “Khong gian cong dong” (Community Space). Cheers for Vietnamese opensource developers!

Posted in Technology | Tagged , | Leave a comment