Wednesday, May 30, 2012

Sunday, May 20, 2012

Mark Zuckerberg Gets Married

A man, even if he lives worth, gets married. ;)

  Whats a surprise. Facebook founder gets married. The girl is Priscilla Chan, his longtime girlfriend.

  Zuckerberg and the 27-year-old Chan wed at a small ceremony at his Palo Alto, California.

  Take a look at Zuckerberg's personal page on Facebook, and you'll see the above picture.

Wednesday, May 16, 2012

Google Search is dying or why SEO is ineffective and faulty

First of all, I have to say I'm not a professional nor SEO expert, I'm just a human seeing things not visible for Google bots but obvious for others. And there I will expose my own thoughts and opinions and nothing more.

So, let me say it again: Google Search Engine is dying. There are serious evidences about bots being unable to understand web content and start complain.

"Duplicated content in your site, the page A has the same contents as page B, prioritize it for best indexing" .... what the heck is it. People often like to say something twice or more times. So what? Is it really duplicated content? No, it is not! I could say this is "same content in different context" or just "same content". And I really don't mind about prioritizing such pages. The pages are same, the bot must choose one and forget about other, not complain. This is really smart bot and Google claim to have such bots... or not?

This is really big questions. Does Google have smart bots or they just can not manage modern web contents as Google claims.

Does the people really need such (smart and mighty) search engine. Todays the people are often inclined to share their contents to friends, not searching for web contents. Put simply, just because there are no accurate evaluation of web content. At least for now. Why news spreading sites are so "SEO optimized". More often the content stream is not valuable information for more than of small group (1000~10000~100000) of people. Being that a simple true, SEO is just a cheap trick for money earning experts claiming they will make your site appear at first position in Google search results. People share the interesting content outside the mighty net bots limits. They speak each other, they write a recommendations (in a billion different ways), they draw a picture, etc. If web content is not interesting or valuable, there is no web bot being able to point people to it.  You can say, people often click on one of the first 10 results. Yes, this is true, and I can say people are often disappointed from the content they are seeing.

Another frustrating thing: http://somedomain.com is different from http://www.somedomain.com (if there are no redirection) for Google.  But it is not different for me. What the stupid bot you are to not know or learn about such idioms. This is same if someone call me Mr. John Smith or just Jhon Smith. People already know that, but machines not. This is another reason Google is going to die in the modern web.
Another example:
http://somedomain.com/some-page  and
http://somedomain.com/some-page/ (note the trailing slash).
Google often complain this is duplicated content. How stupid. It is same if my wife call to me ending with "darling" or "honey". No difference, I already know it is a word (or call) about me and not complain. SEO experts told you "removing railing slash is Search engine optimization" and I believe they cheat you. If I'm going to write a search engine, I will certainly implement such a smartness in my bots.
I don't know why Google does not implement it. But I believe it will lead to Google death in web search race.

Thats all for now, late I will continue with my humble opinions and thoughts about web searches.


Google is dying.... long live the web.

Saturday, May 5, 2012

GOLANG: Call inherited constructor

Golang is new and innovative program language from Google. It is fast enough, flexible and powerful. But if you want to program something classic OOP, it is not so easy. At least, you have to change your mind, turn at 180°.
So, here is my 1 hour research about classes in Golang and class constructors.

First, I already knew there is a kind of inheritance in Golang structs (or classes in traditional OOP language). Now I will check is there constructor chaining when creating new class. To be more clear, lets look at C# example:

public class ClassA {
  public int A;
  public int B;
  public ClassA() {
    A = 1;
    B = 2;
  }
}

public ClassB : ClassA {
  public string C;
  public ClassB() : base() {
    C = "test"
  }
}

So, after ClassB creation, all members are initialized.
How this can be done in Golang? The answer is: easy, but not so obviously. Let see  the Golang code (more customized and decorated with lots of println)

package main

type ClassA struct {
    A int
    B int
}

func (self *ClassA) PrintA() {
    println("A is ",self.A)
}

func NewClassA() *ClassA {
    a := &ClassA{1,2}
    println(a.A, a.B)
    return a
}

type ClassB struct {
    *ClassA
    C string
}

func NewClassB() *ClassB {
    b := &ClassB{}
    b.ClassA = NewClassA()
    println(b.A, b.B, b.C)
    return b
}

func NewClassB1() *ClassB {
    b := &ClassB{NewClassA(), "test"}
    return b
}


func main() {
    a := NewClassA()
    println("done A, a.A=",a.A,"a.B=",a.B,"\n")

    b := NewClassB()
    println(b.A, b.B, b.C)
    b.PrintA()
    println("\n")

    c := NewClassB1()
    println(c.C)   
}

results here:
1 2
done A, a.A= 1 a.B= 2

1 2
1 2
1 2
A is  1


1 2
test

So, calling (chaining) inherited constructor is easy, just place it at struct initialization like this:

 a =  ClassA{inheritded_constructor, ....}

or call it separately on parent member like this:

   this_class.parent = constructor()

Thats all. Hope this example will be useful.

PS: archlinux users can install golang with:
# pacman -Sy go