terriko: (Default)
[personal profile] terriko
I'm working on a Firefox extension.

For those of you who have not attempted this, let me tell you a few things about the experience:

(a) I'm working in JavaScript. JavaScript likes to fail gracefully, which means that it doesn't tend to spew error messages every time something goes wrong. That's nice if you're using it, but annoying when you're trying to track down an error.

(b) And then, in case it wasn't quiet enough, I put it into an add-on, where it's even more silent, and on top of that I can't bring my usual JavaScript debugging tools to bear on it because they only operate on the code in a web page.

So basically, I've been programming for the past few days without all the usual modern coding conveniences. I have been reduced to debugging almost entirely from the equivalent of printf or echo. Thank goodness I at least have syntax highlighting. To use a terrible analogy, this is akin to writing everything on a typewriter -- better than a quill and ink perhaps, but still not quite up to the modern computer when it comes to the easy fixing of mistakes.

I've lost track of the number of times where I've deleted my non-working code, retyped it all, only to find that this time, it works. The problem before was almost certainly a typo, but it was less trouble to re-write than try to find the missing character. Incredibly frustrating.

That said, I actually kinda like Firefox extension development, even if the minutiae are irritating. It's incredibly satisfying when it works, and I can then try my code out on any web page I want, really easily. So much data. And the idea that other people will be able to install my code is surprisingly appealing. (Well, perhaps not that surprising -- I used to write IRC scripts back in the day.)

But I do feel a little like I'm the dark ages here, and I find it hard to believe that other people placidly program in this environment. So I'm guessing there are tools out there, I just don't know them. Last time I tried any was probably pre Firefox 2.0, and I wasn't thrilled, but I'd be happy to take some recommendations now if things have gotten better now that we're up to 3.5!

Date: August 8th, 2009 01:48 am (UTC)
ext_126642: (Default)
From: [identity profile] heliumbreath.livejournal.com
Ahh, that brings back memories of debugging FORTRAN listings, printed on 132-column fanfold, with a selection of different-coloured pens for each phase (flow-of-control, flow-of-data, etc) of my analysis, and various proofreading marks and handwritten code for what I wanted to keypunch next go-around.

Debugging

Date: August 8th, 2009 07:34 am (UTC)
From: (Anonymous)
I'm a big fan of the printf() style of debugging. Seriously, I'm not kidding. Step through and step over and whatnot of IDE and gdb debugging gives me the hives. It's just so unfriendly but has everyone convinced it's superior than printf() (or sys.stderr.write if you're a python maven nowadays like me). I'm more willing to buy into the JUnit/unit-testing religion having once or twice been in the email presence of Erich Gamma and the real presence of Kent Beck---but even then, JUnit is just IMO a smarter way of doing printf for debugging, at some level. assert!

Re: Debugging

Date: August 8th, 2009 07:36 am (UTC)
From: (Anonymous)
Asad again...

I wish these livejournally/dreamwidthy things had options other than anonymous and sign-up-for-something like real true genuine blogs do.

Asad.

Re: Debugging

Date: August 10th, 2009 06:50 am (UTC)
From: (Anonymous)
Not only that (which is a big *that*), but they should also make https://www.dreamwidth.org/ not go to a "Not Found" page, but redirect to the unsecured main page or just serve up the main page in secured mode.

Also, while I do respect the need for having a woman-friendly online open source project, does the whole pink thing make it more friendly or does it reinforce stereotypes? I mean that seriously.

Asad

JS Development

Date: August 8th, 2009 06:37 pm (UTC)
From: (Anonymous)
Not sure what you're using right now, but Firebug (the Firefox plugin) catches a lot of executed javascript issues (including warnings) with fairly straightforward explanations and line numbers and all that jazz.

I do a lot of my JS coding in Dreamweaver, Textpad or Scite, which all do a pretty good job of code hinting and colouring, but none do very good (any) bug catching.

I've heard there's a pretty good Javascript Development Toolkit for Eclipse, if you're comfortable coding using their IDE. I have no experience with it, but it may be worth exploring.

-Jay

Profile

terriko: (Default)
terriko

January 2026

S M T W T F S
     123
45678910
11121314151617
18192021222324
25262728293031

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 2nd, 2026 09:50 pm
Powered by Dreamwidth Studios