GWT Development Mode Bookmarklet

Posted by Jason Terk on Thursday, March 18

Sometimes, when debugging a GWT application, one needs to attach the magical gwt.codesvr= incantation to a URL manually, for whatever reason. It's easy enough to do this by hand but even easier to use a bookmarklet. Create a bookmark from that there link and, when you click it later, it will add the GWT development mode parameters to the currently open URL. If you need to use a development mode server other than localhost you'll need to edit the bookmarklet accordingly - it may be easier to do so using the un-collapsed script:

javascript:(
  function() {
    h = "localhost";
    p = "9997";
    l = "gwt.codesvr=" + h + ":" + p;

    if (document.location.href.indexOf("gwt.codesvr") < 0) {
      q = document.location.href.indexOf("?");

      if (q < 0) {
        document.location.href = document.location.href + "?" + l;
      } else {
        b = document.location.href.substr(0, q + 1);
        e = document.location.href.substr(q + 1);
        document.location.href = b + l + "&" + e;
      }
    }
  }
)();
0 comments

Old Is New

Posted by Jason Terk on Friday, November 27

I switched the blog to a different back end and a slightly different style. I'm using Hobix (again, I used it back in... 2007?) and have made a bunch of modifications to support what I want to do. I have a fork of (a fork of) the original Hobix project at Github. I also have a bunch of local modifications (for things like Markdown support and permalink preservation - real exciting, I know). I'll probably publish these at some point. Here's to blogging more...

0 comments

Not The Kind With Sand

Posted by Jason Terk on Monday, January 12

The (almost) always entertaining Daily WTF has an article today about my favorite pair of standard C functions, setjmp and longjmp:

If goto is considered harmful, then longjmp() should definitely be considered dangerous. As in, thermo-freakin-nuclear bomb dangerous. Fortunately, its complexity and frequency of use seem to be on par with that of a nuke, and most C developers have not brought it in their everyday. Most.

0 comments

strtok

Posted by Jason Terk on Thursday, July 10

From the strtok/strtok_r man page:

BUGS

  Avoid using these functions.
0 comments

Senryu

Posted by Jason Terk on Thursday, June 12

Hacked to little bits;
this piece of code fits right in.
Fix it later. Right.
1 comment

Nerd Inside Joke Of The Day

Posted by Jason Terk on Friday, August 10

At work I'm doing some old school C programming, which made me think of the OS class I took at BU. Just for shits and giggles I looked up the man page for longjmp(). The best part of the page, by far, is the NOTES section:

longjmp() and siglongjmp() make programs hard to understand and maintain. If possible an alternative should be used.

Understatement of the millennium (and the last millennium too).

1 comment