Twitter is (Always) Over Capacity

 

When did it become acceptable for a web service to become completely inaccessible whenever it has load issues? Can you imagine if Facebook constantly put up messages like,

Facebook is over capacity
Too much activity! Please wait a moment and try again.

Somehow Twitter seems to get away with it.


Firefox 3.6 Seems Better Behaved

 

Before I upgraded to Firefox 3.6, I had two major complaints with the browser:

  • It crashed all the time. Sure, the tab recovery feature saved my work each time, but it was still extremely annoying.
  • Firebug leaked memory like crazy. Leaving Firefox open would cause it to run slower and slower as time went by. Disabling all panels didn’t solve the issue. Only disabling the extension fixed it.

After upgrading to 3.6, it seems as though both of these annoyances were fixed. The browser hasn’t crashed a single time (yay for crash reporting), and Firebug (the only reason I stuck with Firefox) doesn’t seem to bog down the browser over time anymore. Yay for progress.


Setting a Default “Run As” in Eclipse

 

Haven’t used Eclipse in quite a while, and started on an Android class project today.

When I wanted to run my application in the emulator, the following “Run As” popup appeared:

The problem was, this popup appeared every time I wanted to run the application, even though my selection never changed (Android Application).

Here’s how to make it remember your preference:

Preferences->Run/Debug->Launching->Launch Operation->Always launch the previously launched application

Here’s what you should be seeing:

Bam! Easy as pie.


You have an error in your SQL syntax

 

I find MySQL’s error messages pretty annoying due to how vague they usually are.

SQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near blah blah blah at line #

Not helpful.

I was doing a very simple INSERT into a new table I had created. The table had two columns, which I named “key” and “value”. Here’s what the query looked like:

INSERT INTO tablename (key, value) VALUES ('Text1', 'Text2') 

The syntax is correct, but it just wouldn’t work, and kept spitting out that annoying error message.

Finally, it dawned on me that “key” is a reserved word in MySQL, and therefore needed quotes to inform MySQL that I was talking about the column rather than the reserved word.

Doh.


Gmail: Did You Mean to Attach Files?

 

I’m loving this (new?) feature of Gmail that detects things like “I’m attaching” and offers a javascript confirmation if you try to send it off without anything attached. I’ve often sent off emails forgetting to actually attach documents, only to have to send it in a second email.


Make Firefox Tabs Appear at End of List

 

If you recently upgraded to Firefox 3.6, you might have noticed that opening links in new tabs cause the tab to be created immediately after the current tab in the list of tabs, rather than the previous style of opening new tabs at the end of the list (far right). In other words, tabbed browsing was changed from FIFO to LIFO, or from a queue to a stack.

While there’s no easy option in the preferences to regain this old behavior, changing it back is still quite easy.

  1. Go to about:config in your URL bar
  2. Click the I’ll be careful, I promise! button
  3. In the filter bar, type in browser.tabs.insertRelatedAfterCurrent
  4. Double click that entry, which should currently be true, to set it to false
  5. Close the window

That’s it! You should notice the old behavior immediately after doing this.


An Example of Why “Like” is a Bad Feature Name

 

I think social networks and other “social” services need to move away from the word “like” for sharing information. Often the word is used to indicate popularity of a certain thing… RSS feed stories in Google Reader, news stream items in Facebook.

However, the meaning behind “like” and the intention of sharing an item or showing that you think it’s important often don’t overlap. For example, check out the above story in my news feed just now. It’s about a couple in Korea who starved their child to death because they were obsessed with a game. Why would you “like” that story? Of course there’s always a “share” option for passing on this item to your own network, but that’s a bit different.

Facebook is the same. They only offer a “like” or “share”. If someone posts a really tragic story, you can either “like” it, or republish it to your own stream. If someone posts a really sad personal or news item, there’s no way to indicate “I support you”, or “I think this is important”.

Digg is a little better, in that the word “digg” is a little less meaningful, and a lot more in line with what it means. Reddit’s up and down voting system is even better in this regard.


Something I Dislike About Delicious

 

Delicious was once a poster child of Web 2.0, being one of the first web services to embrace concepts like tagging (aka folksonomy). Then Yahoo bought it, and it’s almost as if Delicious decided to race Yahoo downhill to see who could die faster.

They had a redesign and upgrade recently, but it’s becoming more and more clear that the service is going nowhere. I feel like a few good engineers could really turn the ship around in big ways, but there’s just nothing going on.

Aside from the fact that they lack even simple filters for browsing recent bookmarks (how about filtering by age or number of bookmarks?), here’s one of the usability fails that has been bugging me recently:

When browsing recent bookmarks, you can change the display style of the bookmarks, including how much information is shown with each one. When you switch over to the popular page for that same tag, the link to change the display format disappears while everything says exactly the same!

If a page is affect by a certain control, then that control should appear on the page. That should be expected right? Why should I have to switch to “recent bookmarks” in order to change the view on “popular bookmarks”.

What’s funny is that the space is still there. Nothing took its place. It’s simply gone.


503 Service Unavailable with Curl in PHP

 

Recently, for a small school project, I pointed one of my domain names away from a server I lease and towards my Rackspace Cloud Sites account. The transition went pretty smoothly.

However, today I was trying to do a GET request using Curl on a specific page. The code was something like the following:

$c = curl_init();
curl_setopt($c, CURLOPT_URL,  "http://domain.com/page.php");
curl_setopt($c, CURLOPT_TIMEOUT, 5);
curl_setopt($c, CURLOPT_RETURNTRANSFER, TRUE);
$cr = curl_exec($c);

Instead of getting the page back, I received the following response:

Service Temporarily Unavailable

The server is temporarily unable to service your
request due to maintenance downtime or capacity
problems. Please try again later.

Any Curl request directed at the domain name would return 503, while the same request on any other domain name worked fine. After a good amount of time trying to figure out what was wrong, Googling the issue, and talking to tech support, the support technician asked me to try the IP address directly.

I tried pinging the domain name from my server, and suddenly realized that it was trying to ping itself. Turns out the server thought the domain name was still on the server, and was therefore calling the GET requests on itself.

Doh!


Create Graphs with HTML and PHP

 

If you need to quickly graph some data you have, did you know you can graph it using only HTML and PHP?

I was doing some research for my master’s thesis today and needed to create some flexible graphs of various things. The screenshot above is of a graph using tables and divs.

The trick is to use vertical-align: bottom in each table cell, which contain divs. Each div is an individual bar in the graph. Simply give the divs a background color, and set the heights depending on your data!