How-To & WebApps 05 Sep 2008 12:44 pm

The HTTP Status 122 Error in IE7 in Ajax Apps

Summary: Don’t use the GET method in Ajax Apps, if you can void it, because IE7 craps out with more than 2032 characters in a get string.

Here’s the page that craps out at 2033 characters with IE7:
http://www.codebelay.com/status122/?i_limit=2033

You won’t see the error with other browsers.

Here’s the page that’s okay:
http://www.codebelay.com/status122/?i_limit=2000

What’s going on here?

picture of http status 122
Sometimes you’ll write a piece of Javascript that uses prototype and looks like this:

  var url = '/status122/listener/?stuff=' + encodeURIComponent($('js_stuff').innerHTML);

  // This is where we send our raw ratings for parsing
  var ajax = new Ajax.Updater(
	 'jskitdecoded',
	 url,
	 {
		method: 'get',
		onComplete: showResponse
	 }
  );

If you print http.status you get an HTTP Status of 122. WTF?

What’s going on here is that IE7 sets a limit of 2032 characters on GET strings, so you have to do a POST instead like so:

  var getvar = encodeURIComponent($('js_stuff').innerHTML);
  var url = '/status122/listener/';

  // This is where we send our raw data for parsing
  // If we use method: 'get', IE7 will return a 122, but
  // b/c Firefox is RFC2616 compliant and realizes that
  // there is no minimum length for a URI, we get success.
  // Here we use method: 'post' b/c IE7 is lame.
  var ajax = new Ajax.Updater(
	 'jskitdecoded',
	 url,
	 {
		method: 'post',
		postBody: 'stuff=' + getvar,
		onComplete: showResponse
	 }
  );

I hope this helps.

What Ajax quirks have you run into?

Questions & WebApps 04 Sep 2008 11:20 am

SubEthaEdit for Linux?

SubEthaEdit is a fun editor that links coders via OS X’s chat. You and your friends can see each other’s cursor in the editor and edit accordingly. From a management perspective, it’s quite satisfying to see your coders collaborate on the same tough problem that crops up and you have to have everyone talk about it.

pic of subethaedit

Dear Lazy Web,

I have two questions:

Is there a SubEthaEdit for Linux?

What collaborative technologies do you use for coding?

Cheers,
Barce

PS I use eclipse, svn, pastebin, IM, IRC, and sometimes ventrilo. I would love to just use SubEthaEdit though.

Announcements & TechBiz & WebApps 03 Sep 2008 02:14 pm

Gearing Up For HackDay At Yahoo on September 12th

picture of hackday at yahoo

I just signed up for HackDay at Yahoo, which will bring together a lot of cool people in the industry.

I’m hoping to just spend the day and talk to folks about what’s inspiring them lately.

Comment below if you’re going. Also share with me and the folks commenting what you’re hoping to solve or build.

Announcements & TechBiz 02 Sep 2008 10:16 am

What I Learned at ROFLCon: Numa Numa and Too Many Wannabe PUAs

Bad News:

  • I’m pretty much done with tech events with too many dudes pretending to be Pick-up Artists. Tech Events with 80% dudes was cool in 2005 before the book, The Game, came out. But now that all these chumps have a license to be douche bags, I think it’s kinda silly that all these guys are AMOG’ing guys in their own industry. Douchebags being negative towards their industry peers just for the attention of a random 20 year old.


Pic of Mystery
If you act like this guy at a tech event I will kick your ass.

“Picking up” women is not some video game, or like Dungeons and Dragons. There are some real life consequences to being a player. One of them is me kicking your ass if you interrupt me with the intent of tooling me while I’m talking to someone.

WARNING: If you pull any of that game or player bullshit, when I am talking to someone; if you tool me, I will drop you to the floor and frog walk you out of the tech event we are at. You have been warned!

Good News:

  • Ben Huh of I Can Has Cheezburger put on a pretty cool discussion on the types of jokes out there. I’m gonna try to find the slides for that.
  • Numa Numa is my favorite viral video. I still laugh when I watch it.

Social Media & TechBiz & Uncategorized 29 Aug 2008 09:23 am

ROFLCon Poised to Give LOLS

I’ll be heading off to ROFLCon this evening. It’s a geek event where Scoblian passionates will gather in a secret power cabal and plan the overthrow of the non-passionates.

pictures of rofl

LOL

I’m really there because the creators of ICanHasCheezBurger will be there talking about what it takes to harness the wisdom of crowds to make the funniest and cutest site on the Internets.

Social Media & TechBiz & WebApps 27 Aug 2008 03:49 pm

Ubiquity puts the World at your Finger Tips

Ever wanted to edit, save, Twitter, Friend-feed, email, add to your calendar, and yelp a web page without doing much typing?

The Ubiquity plug-in does just that!

So far with Ubiquity, I’ve been able to automatically send emails of interesting webpages to friends without cutting and pasting, look up weather, Twitter, and Friend-feed. The last time I used a tool this cool was SocialBrowse.

TechBiz & WebApps 26 Aug 2008 04:01 pm

Google doesn’t like Word Press Pages

I put my hCard in my “About Codebelay Blog” pages, and noticed that doing a search on hcard-barce which is the DOM ID for my hCard returned 1 result. That one result was wrong.

I checked my logs for any signs that Google hit page_id=2 and to my surprise, Google didn’t crawl that page at all. In fact none of the major search engines except for PDF Bot hit it.

Is there a way to make my Word Press page with page_id in the URL more visible to search engines?

QA 25 Aug 2008 09:41 am

Automated Functional Testing with Selenium IDE

Are you a web developer that gets tired of typing the same thing over and over when you’re coding forms? Look no further than Selenium IDE. It’s a firefox extension that you can download, and that allows you to do automated, functional testing.

screenshot of selenium IDE

You simply let Selenium record what you are typing and your mouseclicks, and then save what you clicked and typed as a test file. You can play back that test file as many times as you need to get that pesky bug fixed. Now you can troll the WoW forums with all the time you saved.

Another tool to look out for is functional testing from the command-line using symfony’s functional testing tools. Unlike Selenium, you won’t need to open the browser. Currently symfony’s functional tester doesn’t work with sessions yet.

From the Perl camp, there’s also WWW::Mechanize, but it won’t work with testing Ajax functionality.

Announcements 22 Aug 2008 03:32 pm

The Friday Five for August 22nd, 2008

Here are 5 links worth checking out before you head out the door:

  1. Tara Hunt blogs about Ma.gnolia going open source. This blog post provides a link to the git repository and google group.
  2. The Outside Lands Music Festival has a great line up!
  3. Another victim is claimed by the blue screen of death.
  4. The latest on the Chinese Gold Medalist age controversy.
  5. 37signals shares with us the Hollywood Launch method for launching a web app. Just pretend your web app is to be marketed like a block buster movie.

Have a great weekend!

How-To & WebApps & ruby on rails 21 Aug 2008 08:54 am

The Rails Console Makes Test Object Creation and Debugging Easy

I really like how the Rails console solves the problems of test object creation and debugging.

Usually, a web developer will push code to the webserver and hit shift-reload on the web browser. With the Rails console, you can avoid all that shift-reload madness.

If I wanted to create 10000 blog posts for testing, I could do something like this:

script/console
10000.times
{ |i| Post.create(:title => “post number: ” + i.to_s, :body => “autogen Booyah!”) }

Through the console I can also do debugging pretty easily:

>> p = Post.find 888

And get this as output:

=> #

A lot of problems in Rails are just solved by running script/console and checking the values of certain variables that are pretty hard to get at through a web browser.

There is pretty much no limit to what can be done through the Rails console. Konstantin Gredeskoul, web developer and songwriter, has found a way to load session data through the console.

Next Page »