Category Archives: JavaScript

Stuff I’ve read or reading …

Some links to stuff I’ve either read or plan to read which I think is interesting:

Python is not Java, tips for Java programmers starting w/ Python:
http://dirtsimple.org/2004/12/python-is-not-java.html
Python for Bioinformatics:
http://www.pasteur.fr/recherche/unites/sis/formation/python/index.html
BioPython:
http://biopython.org/DIST/docs/tutorial/Tutorial.html

I need to know Selenium better, it’s possible that I might consider using it for a project I might be working on (that sounds like it might have some UI bugs/issues/problems):
http://seleniumhq.org/

10 things every programmer should read (this will take a while to wade through):
http://blog.objectmentor.com/articles/2009/02/26/10-papers-every-programmer-should-read-at-least-twice

Xen Cluster Mgt using Ganeti for Debian Lenny:
http://www.howtoforge.com/xen-cluster-management-with-ganeti-on-debian-lenny
Ganeti admin guide and install guide:
http://ganeti-doc.googlecode.com/svn/ganeti-1.2/admin.html
http://ganeti-doc.googlecode.com/svn/ganeti-1.2/install.html

David Byrne (of Talking Heads) interviews Thom Yorke (of Radiohead):
http://www.wired.com/entertainment/music/magazine/16-01/ff_yorke?currentPage=all

With a great quote, that shows how well the record companies treat their performing artists (that’s sarcasm in case you don’t have a sense of humour). First Radiohead made zip/zilch/nada from EMI sales of digitized versions of their music:

Yorke: In terms of digital income, we’ve made more money out of this record than out of all the other Radiohead albums put together, forever — in terms of anything on the Net. And that’s nuts. It’s partly due to the fact that EMI wasn’t giving us any money for digital sales. All the contracts signed in a certain era have none of that stuff …

Yorke: … It’s about whether the music affects you or not. And why would you worry about an artist or a company going after people copying their music if the music itself is not valued?

Then he talks about how the music iteself isn’t valued, but the business processes surrounding the marketing and selling of music:

Byrne: You’re valuing the delivery system as opposed to the relationship and the emotional thing…

Yorke: You’re valuing the company or the interest of the artists rather than the music itself. I don’t know. We’ve always been quite naive. We don’t have any alternative to doing this. It’s the only obvious thing to do.

Netbeans 6.5, with Ruby on Rails & JMaki

While writing some RoR code at home (or at least trying to grok the RoR way) I’ve alternating between using Emacs & Netbeans 6.5. Emacs is one true editor to rule them all, but what it’s lacking is code completion such as in Netbeans.

I was working on test RoR project last night with Emacs, and after a couple of hours imported the project into Netbeans 6.1 (a painless process). When I opened the “.erb” file I had been editing in Emacs, I noticed a panel on the right side of Netbeans titled “Palette”, that allows easy creation of html items such as tables & lists. It also, includes JMaki support for Dojo, Yahoo’s YUI, Scriptaculous, Spry, & JQuery, which allows quick and easy insertion of Ajax features using JMaki. After about 5 minutes of mucking around with various Ajax tables, I was easily able to replace a basic HTML table with a prettier, sortable, Yahoo YUI, Dojo, or JQuery tables.

Here’s a rough example, showing the difference between an list, and a sortable Yahoo YUI table created with Netbeans & JMaki:

Sample Tables

This is fairly powerful, and for those inexperienced with Ajax provides a quick and simple way to add Ajax features to a web-page or application as it provides Ruby constructs to create the necessary JavaScript and encapsulates the programmer away from the JavaScript. On the other hand, if your an “ace Ajax guru” this doesn’t allow you to directly write and access JavaScript, and the abstraction might seem like an hindrance.

Here’s a quickie overview showing how to use the JMaki features using a 6.1 beta and Ruby on Rails:

http://blogs.sun.com/arungupta/entry/jmaki_on_rails_reloaded_for

And a more recent generic overview using 6.1 & standard HTML/JSP:

http://www.netbeans.org/kb/docs/web/ajax-jmaki-quickstart.html

What’s also useful, is that JMaki in Netbeans creates the same looking code on your HTML rendering page, which means that if you can create JMaki widgets using Java you can easily do the same with RoR, and presumably with PHP.

If your haven’t looked at Netbeans 6.1 or haven’t tried Netbeans in a while, I do think there are some really useful features that sometime give it the edge over it main competitor Eclipse. I use both IDE’s regularly, and prefer Eclipse for Java & Perl development, but for RoR (especially on Linux) and Ajax features I think Netbeans is the winner (for now). However, there is a JMaki plugin for Eclipse which I haven’t tried that might be comparable (for Java applications).

Using both IDE’s could be a useful addition to a programmer’s toolbox. What I must do next is test Netbeans with a J2EE project created under Eclipse and see if I can use both IDE’s on the same project without problems. It be interesting to see if I can edit the Java code with Eclipse and then modify the view and add JavaScript/Ajax feature with Netbeans.

More information about JMaki can be found at:

https://ajax.dev.java.net/

Updated: Fixed version number, it’s Netbeans 6.5 and not 6.1. Fixed typos from writing tooo fast.