

New Stackexchange like site for Ubuntu Q&A - patrickaljord
http://ubuntu.shapado.com

======
SandB0x
A week before Stack Exchange launches their version:
<http://area51.stackexchange.com/proposals/7716/ubuntu>

It would be great if one of these ended up superseding (at least some parts
of) the current Ubuntu forums. Too often the "winning" replies are buried a
few pages into the thread, and the information isn't updated as Ubuntu
evolves.

Edit: I'm not saying Stack Exchange is better, just that there's going to be a
fight!

~~~
patrickaljord
But it's only for English speaking users, and as you say it's not even out
yet. Also: <http://news.ycombinator.com/item?id=1556075>

------
kylec
Note: This is NOT a Stack Exchange site. "Stack Exchange" is a trademark of
Stack Overflow Inc and may not be used to identify anything except Q&A
websites built on the technology of Stack Overflow Inc. It might be
understandable for a third party to make this mistake, but the submitter is
the creator of Shapado himself, and is quite aware that his software is not
Stack Exchange.

<http://stackoverflow.com/legal/trademark-guidance>

Perhaps coincidentally, the private beta of the _real_ Ubuntu Stack Exchange
has just begun. The site will open up to the public in 7 days:

<http://area51.stackexchange.com/proposals/7716/ubuntu>

<http://ubuntu.stackexchange.com/>

~~~
patrickaljord
> Note: This is NOT a Stack Exchange site. "Stack Exchange" is a trademark of
> Stack Overflow Inc and may not be used to identify anything except Q&A
> websites built on the technology of Stack Overflow Inc.

You should re-read the title, it says "stackexchange _like_ site", not
"stackexchange site". Also this site has the support of many from Canonical,
the company that owns Ubuntu.

> Perhaps coincidentally, the private beta of the real Ubuntu Stack Exchange
> has just begun

But stackexchange is only for English speaking people. How about people from
South America like myself or the rest of the world? Shapado supports many
languages <http://translatewiki.net/wiki/Translating:Shapado/stats> and
integrates with more services, including Launchpad from Ubuntu. Also, Shapado
is open source which is more in the spirit of Ubuntu.

~~~
kylec
I realize Shapado is basically a clone of the software, but identifying it as
"Stack Exchange" even with "like" after it is still a trademark violation. You
don't see advertisements for "Toyota-like" cars or "Apple-like" computers for
precisely that reason.

~~~
photon_off
I'm having a hard time believing that trademark violation is the _precise_
reason Apple and Toyota don't make stupid advertisements. I think it's because
they don't want to make stupid advertisements.

If OP wants to compare one website to his, I think that's fine. He's not an
established brand, and this comparison helps me understand what to expect.
He's not claiming his site is part of the Stack Exchange network, he's just
saying it's similar. If he used any other term of comparison, like "better
than" "worse than" "faster than" "slower than" I don't think you'd mind. So
what's so bad about using "like" ?

------
patrickaljord
This is supported by some people at Canonical such as
[http://www.fabianrodriguez.com/blog/2010/07/19/an-
invitation...](http://www.fabianrodriguez.com/blog/2010/07/19/an-invitation-
to-try-ubuntus-qa-on-shapado-com/)

Shapado has the advantage of being localized in many languages so that not
only English speakers can ask and answer questions. Also just like Ubuntu,
Shapado is 100% free and open source.

------
papapep
Shapado works like a charm, it's free, opensource, supports l10n and has many
other great features. What else can we ask for? There's no possible comparison
with a closed, for only english speakers application. Shapado is the way!

~~~
DrJokepu
My only problem with Shapado is that, I don't know how to say that nicely,
it's just simply hideous (in my opinion, at least). I'm not talking about
major things, I mean a bunch of minor things such as things not lining up
perfectly to the natural grid of the page, inconsequently used font sizes,
etc. Nothing a professional graphic designer couldn't fix in a day.

~~~
jfr
This is the first time I saw a Shapado site. In fact, I just learned its
existence. Yet, in 3 minutes browsing the site I found may issues that raised
a red flag.

They made some very primary design mistakes. Observe the schema of question
URLs, for example. They don't contain any numeric identifier, only the
normalized contents of the title of the question. This means that:

1\. Sooner than later the database indexing of questions from URL contents
will become a bottleneck. In the best case, the whole URL has to be hashed and
the (non-unique) hash looked up in the database. If it had a unique number,
the application can just snap that part of the URL to uniquely retrieve a
single entry. Also, if load balancing becomes important in the future, having
a short unique identifier easily accessible in the URL is very important.

2\. If the title of a question changes, either the URL changes too (which is
not good (<http://www.w3.org/Provider/Style/URI>) and causes problems) or the
URL has to stay unchanged with the old contents of the title.

Another issue:

Country flags are displayed along usernames. I can't find the reference here,
but this is a touchy subject in some cultures. Some cultures don't like to see
flags for other countries, or don't want their flags to appear in a computer
screen.

~~~
patrickaljord
1\. We don't allow two questions with the same title, so I don't see how it
will become a bottlenec. Can you explain please?

2\. We already take care of that, the old urls are still valid, we just make a
redirection with permanently moved code.

About flags: People can choose not to show them on their settings page. Also,
no big deal.

~~~
jfr
1\. Not allowing two questions with the same title is yet another design
issue, not a feature. Avoid making unique indexes on every field
unnecessarily. Lets call it problem "3" then, I'll go back shortly to it.

Back to problem 1, if you use the normalized title as your primary key, you
will have to map this key to the tuple, value or document stored in the
database. The title of a question is supposed to be a free-form textual
redaction written by the user to express his/her inquiry or idea. It can be
arbitrarily short or long. You will probably have to set a low limit to it,
because you don't want people dumping kilobytes of text in the title, but it
also can't be too short, otherwise people won't be able to express themselves.
Is the maximum length chosen for the title of a question appropriate also for
the primary key of your table?

In order to be a primary key, the database has to compare the entire key
against an index of keys present in the table. If all N characters are part of
the key, it means that this lookup is O(N) on average (just transversing the
key, plus the index lookup itself), because it has to consider the whole
string. Compare with O(1) of an unique numeric identifier.

But you then say that you can hash the original key and use the hash result to
lookup the index in O(1). Yes, but hashes are not unique. Two different
strings may result in the same hash. The index has to consider that any key
may contain multiple tuples, in a bucket or in a linked list, or something
else. An additional O(N) compare is necessary to recheck that you indeed got
the right result or some other result which happens to have the same hash.

But you then say that you will limit the size of the key in the db indexing.
Still not good. This doesn't work well since the key comes from the title, and
the title is free-form text entered by the user. If you limit to, say, 64
characters, what if two users type two similar but different questions with
only the last characters differing?

So, it is much more work either to your app or to your database to use a big
key instead of a short unique id. It means that if your app which would be
able to handle 1000 reqs/sec with short unique ids, it ends up handling only
around 200 reqs/sec using big primary keys (depending on how big is the key,
the hashing function used, etc). This is the bottleneck.

If it grows and you hit some hardware limits, and then you think about load
balancing, it also means that you will have to implement the same costly
algorithms on the load balancers. The load balancers will have to hash your
URLs in order to decide to which DB cluster to redirect the request, while if
it had a short unique ID it would be extremely easy for the load balancer to
perform the distribution based on the that ID.

And then, long URLs. Long URLs are terrible, in many, many ways. While
analyzing the sites, I found conflicting results about what Shapado does with
long URLs. In shapado.com they seem to be capped, while in ubuntu.shapado.com
they are not:

[http://shapado.com/questions/besides-shapado-which-other-
qa-...](http://shapado.com/questions/besides-shapado-which-other-qa-open-sour)

[http://ubuntu.shapado.com/questions/what-s-the-most-well-
int...](http://ubuntu.shapado.com/questions/what-s-the-most-well-integrated-
monitoring-solution-on-ubuntu-zenoss-zabbix-or-cacti-+nagios)

I don't know why the difference (different versions or configuration?).
Anyways, you will find that people will copy-paste these URLs into their
broken e-mail programs, which will arbitrarily break the URLs in all different
lengths varying from 68 to 80 characters. If you use the entire length of the
URL as your key, you immediately have a problem. If you decide to consider
only the first N characters as your key, then you go back to the other problem
above about two questions with only the last characters different. It is much
better to have the short unique ID earlier in the URL. In this case, if the
latter part is missing, the app uses the ID and either ignore the rest or send
a 302 redirect with the correct URL.

Finally, the normalization takes out some characters from the title, most
notably punctuation. I haven't tested, but the immediate question is: What if
the user asks "どのようにケーキを焼くために？" ?

Now you open a real can of worms. If normalization considers only ASCII
alphanumeric, the key generated by this title is empty. If normalization
considers Unicode, you it may have to handle different Unicode normal forms.
You will have even more issues with the URL being copy-pasted around in
different broken applications. It will also overflow faster when percent-
encoding the URL, because each CKJ character expands to up to three UTF-8
octets, and each octet expands to three bytes after percent-encoding. So a
single "焼" is becomes 9 bytes long in an URL.

Enough of point number one? Next...

2\. Then, what happens user asks "What is Unix?" and then he explains the
question and it becomes clear that what he really wanted to know was about
Linux, and the question is changed to "What is Linux?". (At this point, you
will have two different keys pointing to the same document). After that,
someone else comes and asks again "What is Unix?", now with a different
meaning of "Unix"? What happens? How does it degrade to the point-of-view of
the user?

Also, now, knowing how the system works (as you explained), anyone could go
there and exploit all the short titles to create permanent redirects to their
favorite questions. Just go there and ask "k", then change the question to
anything else that is perhaps useful (for a spammer, for example). Now that
guy "earned" the /question/k short URL for his product or his biased question.

3\. Not allowing two questions with the same title based on your feeling that
such cases will not exist is like saying that you will make a persons birth
timestamp an unique index because you never saw two people who where born at
the same date and the same time. Again, the title is a free-form textual
redaction from the user. You may not see with the limited scope that Shapado
has today, but what about future uses? What about different languages with a
more limited vocabulary that doesn't allow much expressiveness, and question
clashes are more common? In fact, it is not necessary to go that far. Lets
keep it in technical computing English. For example, one user asks:

    
    
        "What is ASP?"
    

Is he asking about Active Server Pages? Or perhaps Auxiliary Storage Pool?
Maybe Application Service Provider or even AppleTalk Session Protocol? Ok, you
can edit the question to reflect one of these many meanings, but it is still
an unnecessary burden on the users. Again, how does it degrade if users hit
this limitation?

The ultimate question is: do you really need to create such an artificial
limitation in your application, with so little information about its real-
world uses (since the project is very recent)?

Well, that is it.

Please, don't get me wrong. It is great to see such a project being born. I'm
always happy to see the open-source community growing and evolving. Take this
as a constructive criticism. All these points raised above are really things
that should have been considered in the design phase of the project, not after
it is deployed.

~~~
jfr
Adding another bit from experience. About the URL from shapado.com I mentioned
above, which had its length capped: If you have to limit the length of the URL
(or any text string in general), try doing it at word boundaries to reduce the
chances of disrupting the meaning of the text. In the title mentioned above,
"Source" became "sour".

Think about what happens to "I saw him beating that assassin" if an
application decided to cap the string to 26 characters to fit an URL, for
example.

Breaking between words reduces the chances of these accidents happening.
Sometimes it is not possible (the title is a single big word, or in a language
without spaces), in which cases you may want to degrade to the normal slicing.

------
toxicflavor
Superuser.com and ubuntuforums.org have worked well for me.

