Recently in JavaScript Category

For the past few days I have been fixing up a website that my cousin found. He was working on some biology/technology homework and was tired of writing out DNA sequences, manually converting them to RNA and then searching through a table to find the amino acids that each trio of letter corresponds to.

Using jQuery and JavaScript magic, I came up with this. It converts DNA to RNA and then finds the amino acids in the sequence. The conversion between RNA and DNA takes place while you type, but you have to click to get the amino acids.

The whole thing is a single HTML file with 3 JavaScript files and a stylesheet. The JavaScript is divided into three categories; data, logic, and views. The data.js file contains information on amino acids. The logic.js file has code that deals with the conversions, and the views.js file has code for displaying the results. The amazing thing is that all of this works in Internet Explorer 6, Firefox 3, Safari, etc. Note: there are other JavaScript files included but they are for the fancy effects in the views.js file, they aren't part of the core logic of tool. The advantage is that the whole package is self-contained and you can copy the folder over to a USB thumbdrive and use the tool on any computer that has a web browser installed. You don't even need a web serrver.

The code is available at GitHub and is licensed under the MIT License.

I overslept by a few hours but I decided to change the colour scheme. The stylesheet I uploaded last night was hideous, though good enough for testing. The new styles and page generation functions are up and I've switched the main page to PHP. The Friend of a Friend Creator is also partially up. I need to add more of the FOAF specification stuff of course, but there's a fancy new date picker (Thanks jQuery-UI!)

The design is very retro, very 70s I would say...at least in terms of the colours. The striped background reminds me of the swimshorts I bought that also have racing stripes. Obviously the design is solid because of this, heh.

Some details...

Today is ShoesFest and I am going to be trying to learn more about Ruby and Shoes but at the same time I will be hacking away at JavaScript and Java, improving Sandals.

That's the big surprise: Sandals. Sandals is going to be a clone of the Shoes toolkit except it will use a Java back-end named BeachHouse. The primary reason for this is because I need to practice my Java'ing, and the secondary reason is that I hope to eventually have JRuby and Jython using BeachHouse. So BeachHouse can be found in the beachhouse/ sub-directory of the Sandals source code package.

Unfortunately, Sandals uses Java's Swing components for some parts but I'm going to try and code up my own drawing methods for the tricky things that Shoes can do. We'll see how that goes later on today.

Happy Shoes hackin'

Links:

I have taken the last two days off as a break from writing Java and JavaScript, and finally took a proper look at Squeak. It is impressive, and similar to working in Emacs in some ways (though much cooler).

The greatest feature of Squeak, and Emacs (and Lisps), is that the documentation for the language and environment is always around and accessible. If I don't know how a function works in Emacs or which methods an object has in Squeak, I can look it up while working in them. This has saved me from asking many stupid questions on the #emacs and #squeak IRC channels, heh.

Anyway, the break was needed because JavaScript reminded me of Scheme, and I had forgotten how horrible coding in Java can be (e.g. RedundantType x = new RedundantType...). Squeak's user interfaces may inspire Sandals in some ways, we shall see.

Check out the Squeak Language Reference

Lying on the beach,
Sun cooking my bacon,
Putting on sandals, sifting sand,
I'm building a beach house today.

Oh, the ocean glows.
Can you see it now?
Guitars, surf boards, dancing people!
Party time on Java island!

About this Archive

This page is a archive of recent entries in the JavaScript category.

Java is the previous category.

Lisp is the next category.

Find recent content on the main index or look in the archives to find all content.

Jobs

Powered by Movable Type 4.1