Personal.X-Istence.com

Bert JW Regeer (畢傑龍)

StackOverflow and other StackExchange websites

StackOverflow and friends are question and answer sites, StackOverflow specifically was created to edge out Experts-Exchange (not linked on purpose) in Google rankings for programmer questions, specifically because Experts-Exchange likes to make their answer sites are confusion as possible, with many different ads and hiding parts of questions until you cough up a membership fee.

Overall StackOverflow has done an outstanding job in doing what their core mission statement was when they started it, and recently has begun branching out into various other territories using the brand name StackExchange. I am very happy that these sites exist, and that they provide much better results for the same questions.

Today I was reading a blog post created by Joel Spolsky, titled "The Wikipedia of Long Tail Programming Questions", in it he brings up some core features that StackOverflow supports, such as everyone editing community questions at 100 rep, and editing any questions or answers at 2000 rep. Rep in this case can be compared to karma on Reddit or Slashdot. Rep is earned by answering questions accurately and having other users "upvote" your posts. Rep may also be lost, but that is outside the scope of this discussion.

  • Some of the suggestions that Joel makes are as follows:
  • Don't answer questions that have already been answered elsewhere.
  • If you're going to close a user's question as a duplicate, it has to be a real duplicate.
  • It is OK to edit a question to make it more general.
  • Help us build a great library of canonical answers.

I agree with all of them except the first. Now, if you quickly take an interlude from this blog and go check out my StackOverflow profile page you'd see that sometime in March (only for two days actually) I suddenly became very active on StackOverflow answering a lot of questions and helping many people, and gaining reputation rapidly. It was shortly thereafter that I slowed down, mainly because the rate at which I was going was only possible because I was on school break, and because I started working on some new projects. Since then every so often when I stumble across a question I will attempt to answer it.

In attempting to adhere to number one as outlined above I tend to do some searches to see if maybe the question has already been answered elsewhere, and also to adhere to number two it takes me at least a minute or two per question.

Then scenario one is as follows: During that time others are doing the same, or maybe already know it is a duplicate and close the question (hopefully linking to another question that it duplicates), those are two minutes I just spent doing some research to provide a better answer that is then not necessarily wasted, as generally I will learn a thing or two, but at the same time I wish the submitter had searched for himself.

Scenario two is as follows: However if the topic is not closed, and is a fairly simple question during the time that I am doing my duplicate search others will have posted a one or two sentence reply that will somewhat help the author of the question. Those will then get upvoted rapidly as people consider those easy questions answered. At that point I will type out a full thoughtful reply that will get ignored and will stick around at 0 upvotes as people don't tend to come back into questions after it has already been answered a couple of times.

This has made me apprehensive of answering questions as they come up on StackOverflow as generally those that I feel qualified to answer will get glossed over and there is really no incentive for me to continue doing so unless I go for the long tail (hope that within the next coming years people find the reply through Google and upvote it then). I feel that the quality of responses on StackOverflow has gone down mostly because you can get one or two upvotes before scenario one plays out and the thread is closed. This means that on duplicates it becomes who can quickly answer and post (hence the one or two sentences) before the mods get around to it. While I really enjoy responding and that should be enough to entice me to respond more, I feel like I am being alienated by lesser quality posts that don't provide nearly the quality that I have come to expect of StackOverflow.

The answers are starting to look more and more like those on Experts-Exchange, the barrier to entry is very low on StackOverflow, mostly on purpose but I also feel that it detracts from the quality the website is required to have to stay useful in the foreseeable future.

One way I can see this being "fixed" is Slashdot style (for people who want to "moderate"). On Slashdot before you get mod points you have to do a couple of different tests to see if you are in-line with the majority, you get to see comments and context and you have to decide what you'd moderate the comment. On StackOverflow a newer user before being given the ability to upvote/downvote answers would then have to first do a small test to see if they are able to decide what is a good comment and what is a bad comment. Then when they start posting other users will judge their replies, and if they are short and don't contain a very good answer they are limited from posting replies in threads that are newer than X minutes. This would give the power users that have earned it the time to do the proper research, write out a good reply, or close the thread as a duplicate without people being able to farm for karma by posting two sentence replies that are completely useless.

Is this feasible to implement? I don't know. Would it provide a higher barrier for entry, absolutely. I think that is a good thing. In closing, I would like to state that I absolutely love the various StackExchange websites, and the ease at which knowledge is now spread, but I have been becoming more and more distanced from the website since the quality of answers went down tremendously, and I am much less likely to spend time answering a question when it is already saturated with one or two sentence answers thus having my quality answer sit at the bottom of the list at 0 upvote points.

CSS 3 needs to be adopted now

This is a simple error that I ran into the past couple of days. I was not aware that the width of an item was calculated as follows:

left border width + left margin + left padding + width + right padding + right margin + right border width.

Well, that off course does not work well when you want to float two items next to each other with the following:

#cont1 { float: left; width: 75%; border: 1px solid black; }
#cont2 { float: right; width: 25%; border: 0; }

These will not float next to each other since #cont1 is bigger than 75% meaning that the other one being 25% gets pushed beneath it.

CSS3 fixes this with the box-sizing: border-box;, this property will make it so that all of the padding, margins and borders are calculated within the allocated width, that means a width of 75% means the entire element will be 75% and everything else will be calculated within it.

You can use it now with the following snippet:

box-sizing: border-box;

-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;

However IE won't render the boxes correctly, nor will older versions of Safari, Chrome, or FireFox. Until CSS3 is ratified and starts being accepted by all major browsers without the browsers specific keywords it is not really that useful. In my case I have reverted to the alternate version of using a wrapper element that wraps around the element, and doesn't have margin, padding and a border.

#cont1wrap { float: left; width: 75%; border: 0; margin: 0; padding: 0; }
#cont1 { border: 1px solid black; }
#cont2wrap { float: right; width: 25%; border: 0; margin: 0; padding: 0; }
#cont2 { padding: 10px; border: 0; }

It does mean that you need twice the amount of tags in HTML, one with an id of #cont1wrap and another inside of that with an id of #cont1, same with #cont2. Not an ideal solution but until CSS3 is made the new king of layout it is the only choice we have that is mostly compliant with most browsers.

Jamie Oliver's Food Revolution

Jamie Oliver, also known as the Naked Chef is a well known british chef that has done several different TV programs as well as written some excellent cookbooks. He was able to start a revolution in his home country to get the school menu changed so that kids are eating healthier food, and thus grow up to be healthier kids.

He has taken this message to Huntington, West Virginia where he was met with resistance and close minded people who did not want to make a change because of how it had been done for years. Jamie kept going even with the amount of resistance, he persevered and after just two episodes of his new TV show "Jamie Oliver's Food Revolution" available on Hulu (watch the episodes).

He was also recently awarded a TED prize wish, to teach every child about food, where he discusses some of the things he encountered in his first episode of the TV show.

Jamie has a petition available on his website, and I urge you to go sign it to show support for not just a healthier United States, but World in general. Teaching people how to cook for themselves is an absolute must, having people learn how to take care of themselves, what goes into their food, and what goes into their bodies.

I'll be the first to admit that I am not the healthiest person, and yes the first two episodes of the show hit close to home, I don't always eat the healthiest food I can find, especially since I don't always like cooking for myself, and fast food is so much, faster and easier.

My wish is for Jamie to succeed in helping change the way the United States looks at food and what is acceptable for people to put into their bodies. Getting rid of even 10% of all processed food will make the United States a healthier place to live and eat, and will lower healthcare costs in the long run as less people will need medicine and medical procedures to help them stay alive because of the amount of grease in their arteries.

Once again, I urge you to please go sign the petition, watch the TED prize wish, and watch the TV show. And if you too, are in the same boat I am in, start making a positive change in your life.

NetBeans why do you disable Save?

I've started programming in PHP again for a new project I've taken up, and I've found that NetBeans upon noticing that the file has already been saved will disable the Save function. This is also disables the ?+S to save the file, which means when I am sitting there thinking, and I mindlessly tap the key-combo it makes my computer "ding" which is the default system beep sound.

It is my hope that eventually they fix it and just leave the save function enabled and if the file doesn't need saving they don't save it. That way my I don't have to listen to "ding" thereby breaking my concentration.

IE 6 and 7

I made a quick and simple decision which has already helped lift a weight off my shoulders. I have decided from this day on forward I will refuse to make my websites look and function right in IE 6 and IE 7. Dean Edwards has created a JavaScript that will attempt to fix IE 6 as much as humanly possible, forcing it to render everything correctly. It used to be known as IE 7, but he has recently released his latest version IE9.js which attempts to fix even some flaws that IE 8 has, while I am not yet ready to drop support for IE 8, I have enabled the latest and greatest version of this JavaScript so on any IE less than 9 the JavaScript will run.

To see everything that IE9.js supports visit the IE7.js Test Pages list and take your pick. The work that Dean has done is absolutely amazing and I am very happy that because of him I don't really have to worry about my websites in older versions of non-standards compliant browsers.

Even Microsoft sent flowers to the fake IE6 funeral with a note saying that we should stay tuned till this years upcoming MIX conference. I hope they say they are support HTML 5 and CSS 3 as that would be simply amazing. Maybe, just maybe they are switching from the old Trident based rendering engine to something more modern.

While I may dislike IE 6 and 7, I won't yet go so far as to put up a message just yet stating that people should get a better browser, I am removing a lot of stress and work in that I no longer have to support the old ageing browser.