Tom Pierce's Blog : Let the geek times roll.
Updated: 3/25/2004; 3:53:03 PM.



Subscribe to "Tom Pierce's Blog" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.


Thursday, March 25, 2004

I'm sure that most people who are web savvy developers have experienced the greatness that is VisiBone's online color lab.  Not being particularly front-end studly, this is new to me.  I like to be able to pick the complementary colors by looking at the pretty hex wheel thingy.  Mmmm...  colors.
3:52:52 PM    comment []

Ever had to write alot of JavaScript?  Better yet, ever inherit alot of JavaScript and not have time to fully understand what it does?  Best - have you ever inherited alot of JavaScript that you don't have time to understand and have to quickly figure out how to extend it?  Well, I HAVE! 

Currently I'm on a project that is built on top of a framework that contains a non-trivial amount of JavaScript.  Normally this would be OK, but I have to actually extend the framework a little for the current project.  And, normally this would be OK (with another language) because you would have tools like compilers, debuggers, and friendly editors that make it easier.  However, we're talking about JavaScript.

So, I had this problem.  I had edited a JS file used by my web app and I expected the goodness to just start flowing.  However, it seemed as if the browser (IE) was not even loading the file.  When I debugged (with Visual Studio Script Debugger), I could evaluate some expressions that lead me to believe none of the functions in that entire file had been defined.  Hmmm...  Why wasn't it reading the file - the declaration in the HTML looked correct.  What's going on?

That's when I started thinking I had some sort of syntax problem with the JavaScript in the file.  But, I didn't know how in the world I could figure it out without a compiler or some kind of LINT tool.  Maybe if I could just find a parser and see if it puked on my file...

Enter RhinoRhino is an open source implementation of JavaScript written in Java and is part of the Mozilla project.  Not only does Rhino contain a JavaScript parser and evaluation engine, but it also contains a JavaScript debugger and interactive shell.  YES!!!

As soon as I tried to load my JS file into the debugger, Rhino told me I had a problem.  The error said I had a missing variable name.  I could tell from the error message that the #288 on the end meant that it was on line 288.  So, I went to line 288 in my JS file:

var default = defaults[0].split("@@");

Hmmm.   That looks fine to me.  What's going on?  Have I used some kind of reserved word as a variable?  So, I switched over to the JavaScript Console window and entered default at the prompt.  Syntax error.  Well, what happens if I enter an undeclared variable like "dude"?  An error telling me "dude" is not defined.  AH HA!  So I have used some kind of reserved word.

So, long story (not so) short, I edited the JS file and changed var default = ... to var defaultFilter = ...  and Rhino read it just fine.  YEEE HA!  Back to the web page.  I fire up my browser, point to my web page and BAM!  No more JavaScript error.  After at least 2 shameful hours of head scratching that left me on the brink looking over at insanity below, the Rhino pulled me back to safety. 

Thank you Rhino...  thank you.


8:14:56 AM    comment []

Tuesday, March 23, 2004

"Groovy is a new agile dynamic language for the JVM combining lots of great features from languages like Python, Ruby and Smalltalk and making them available to the Java developers using a Java-like syntax."

Have you seen Groovy yet?  I hadn't.  It actually looks pretty cool.  I think it's a pretty darned good idea to make the Java platform available in a lighter weight language.  Not sold?  Just check out Groovy Markup and how easily you can create a little Swing window:

// lets create a form with a label & text field for each property of a bean
swing = new SwingBuilder()
widget = swing.frame(title:'My Frame') {
    panel() {
       for (entry in someBean) {
       button(text:'OK', actionPerformed:{ println("I've been clicked with event ${it}") })

I actually got to Groovy while reading an article on why open sourcing Java probably won't cause more developers to move to Java on the server.  The reason?  Because there are languages like Python.

8:22:47 AM    comment []

After a longish pause of over a month, James Gosling got back to blogging this week...but first, as Java gurus do, he threw together from scratch an RSS feed reader - called JNN, for "Juicy News Network."

Cool!  And released under the BSD license, too.  There's even a WebStart version!

8:06:13 AM    comment []

Friday, March 19, 2004

Another cool thing about the Dr. Scheme programming environment is the "Check Syntax" feature.  After you have written some code in the editor pane, you can hit the "Check Syntax" button to make sure you've written valid Scheme.  The syntax checker just checks, well, syntax.  It doesn't catch some of the runtime errors that can happen like calling functions that don't exist.  But that's not its purpose.

The amazingly cool thing about using "Check Syntax" is what happens after your source has been checked (and I'm guessing parsed).  After checking syntax, you can hover over any of the variable or function references in your code and arrows appear to show you where the other references to the symbol occur.  By right clicking on the arrows (control click on Mac) you get a context menu that gives you the ability to tack/untack the arrows and change the name of the symbol you're on.  Very very cool.

Check out the shots...




8:31:09 AM    comment []

Wednesday, March 17, 2004

I finally grew so annoyed with the lack of status bar in IE, I decided to Google for it.  (My love for Google grows with every search, but that's another story...)  Check this out to solve the disappearing IE status bar problem.  Be sure to follow the link in her post to see the actual fix.

8:14:38 AM    comment []

Tuesday, March 16, 2004

I just stumbled upon a pretty good article on the JSTL (JavaServer Pages Standard Tag Library) that can be used as a quick reference.  The article provides a quick overview of JSTL 1.0 and how to use the expression language and tags. 
3:22:50 PM    comment []

Open Source and Outsourcing. I'm at the Open Source Business Conference in San Francisco. I'm in Steve Korn's talk on Outsourcing and Open Source. Steve works for EDS and has some context on how outsourced IT services vendors are using open source. One interesting note from his introduction: they use Jabber internally and apparently with great success. [Windley's Enterprise Computing Weblog]

Note to self:  Time to check out the latest on Jabber. 

Self:  Because EDS is using it (or at least says they are) ?

Additional note to self:  No.  Check out Jabber because it's cool and open. 

Self:  What ever helps you sleep.

1:52:25 PM    comment []

Monday, March 15, 2004

Why Learn Lisp? Sunday, March 14, 2004 "Why le .... Daily Why Learn Lisp? Sunday, March 14, 2004

[Bill Clementson's Blog]

Great list of quotations about why you should learn Lisp.  I love Kent Pitman's quote about "...Please don't assume Lisp is only useful for..."

7:41:18 AM    comment []

Friday, March 12, 2004

I may be in love.  Let's get into it.

I decided that I would bite of Scheme this year.  That decision was based on 1) not being ready to kiss Lisp goodbye 2) being a little lazy (not much syntactic difference between Lisp and Scheme).  The decision was made clearer by Bill Clementson's blog thread "What is the best Open Source Lisp?" - especially part 2.  This is where Bill says that PLT Scheme is the best OSS Lisp environment.

So, I went out and downloaded the latest copy of Dr. Scheme and started reading "Teach Yourself Scheme in Fixnum Days" that is included in the distribution.  Great book for quickly coming up to speed on the major features of Scheme.  Have I finished it?  No.  Am I writing Scheme code?  Yes.  There you go.

The Dr. Scheme environment is wonderful.  I skipped the student levels of the language and went to Pretty Big.  Unfortunately this precludes me from using the Stepper.  But, I still get all the other goodies that are in the environment.  Some of my favorite features:  debugger (shows you the call path visually with arrows and traces the code to specifically the call the generated the error), test case boxes, and the large included set of libraries. 

One of my headaches using other OSS Lisp (CLISP, CMUCL, SBCL) was that you had to go out and find CL libraries and install them by hand.  Even tools like asdf and asdf-install didn't make the process painless enough for me.  Many things worked well with asdf, but some things just didn't work well at all.  In fact, I think that the ACL-COMPAT is not "compat" now that they changed out the ACL Net package for puri.

With Dr. Scheme, the library issue is MUCH cleaner.  In fact, many of the things I've played with so far are distributed with the environment or they have PLT packages that can easily be installed through Dr. Scheme. 

Another great thing about Dr. Scheme is that it's cross-platform.  It works the same on my Mac, Windows, and FreeBSD boxen.  The GUI is based on wxWindows, and the GUI gets the appropriate "look" for each platform.  For instance, Dr. Scheme is all Aqua-fied on my Mac.  On my Windows machine, it gets all Redmond-fied (boring).

So, in summary PLT Scheme is my new best friend.  If you are using OSS Lisp and getting a little frustrated, or if you just want to learn Scheme, then go get Dr. Scheme now. 

8:01:49 AM    comment []

© Copyright 2004 Tom Pierce.

Click here to visit the Radio UserLand website.


March 2004
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Feb   Apr


How this works

Emacs Sources

My Subscriptions