Archive for the ‘General’ Category

IE innerHTML bug

Wednesday, November 12th, 2008

Explorer throws an unknown error when you set innerHTML

The bug seems to only occur for certain markup. I'm not 100% sure what the defining problem is, except that markup containing block elements like <div> and <p> seem to invoke the error. Anyway, this drove me up the wall recently so I thought I'd share the work around I came up with.

(more…)

Bookmark this!
[Bloglines] [del.icio.us] [Digg] [Facebook] [Furl] [Google] [Newsvine] [StumbleUpon] [Technorati] [Yahoo!]

JAS vs ActionScript

Wednesday, October 29th, 2008

JAS is the language that the JASPA compiler converts to regular JavaScript; it is very similar to ActionScript 3.

The acronym JAS derives from JavaScript/ActionScript, but officially it means "JavaScript; Advanced Syntax". This is partly due to potential trademark problems, and partly to make the distinction that it IS a separate language. The JASPA compiler contains absolutely no Adobe technology, or source code whatsoever.

The JAS syntax is designed to be as close to AS3 (ActionScript) as possible. When I say "as possible", I mean that ideally I'd have made them identical, but for reasons too time-consuming to describe, certain things are in, certain things are out, and certain things behave a bit more like AS2. Ultimately JAS is an extension to the ECMAScript (ES3) standard, proving the kind of OOP enhancements that ActionScript programmers will find very familiar.

I shall digress and describe the similarities and differences between JAS and both ActionScript languages, feature-by-feature.

(more…)

Bookmark this!
[Bloglines] [del.icio.us] [Digg] [Facebook] [Furl] [Google] [Newsvine] [StumbleUpon] [Technorati] [Yahoo!]

JASPA FAQs

Sunday, October 26th, 2008

Here are some answers to questions that I imagine would be frequently asked about JASPA if anyone was asking any.

(more…)

Bookmark this!
[Bloglines] [del.icio.us] [Digg] [Facebook] [Furl] [Google] [Newsvine] [StumbleUpon] [Technorati] [Yahoo!]

JASPA says “Hello World”

Sunday, October 26th, 2008

JASPA is a JavaScript cross-compiler written in PHP.

Write robust object-orientated applications in a strongly-typed language (modelled on AS3) and compile it into regular JavaScript to run in a web page, or any other environment that implements a JavaScript engine.

A beta release of JASPA is available for download here. Until there is a more official web site, information on JASPA will be scattered around this blog.

ยป Download jaspa.0.2.2-beta

This download includes one very simple "Hello World" example, you can see it in action here:

(more…)

Bookmark this!
[Bloglines] [del.icio.us] [Digg] [Facebook] [Furl] [Google] [Newsvine] [StumbleUpon] [Technorati] [Yahoo!]

AMF - Errata and other ramblings

Saturday, September 13th, 2008

I've been doing a lot of research into the AMF protocol recently. I've had the pleasure of reading the AMF0, and AMF3 standards cover-to-cover several times, with a view to understanding them well enough to write my own debugging tools. More about those projects another time.

Not only are the standards fairly brief, but they contain errors. I've not managed to find an official errata, so here's my starter for 10. (more…)

Bookmark this!
[Bloglines] [del.icio.us] [Digg] [Facebook] [Furl] [Google] [Newsvine] [StumbleUpon] [Technorati] [Yahoo!]

JASPA Sneak Preview

Thursday, September 11th, 2008

This article has been superseded by the beta release of JASPA 0.2.

Bookmark this!
[Bloglines] [del.icio.us] [Digg] [Facebook] [Furl] [Google] [Newsvine] [StumbleUpon] [Technorati] [Yahoo!]

jsobf - command line tips

Monday, September 8th, 2008

Here are some quick tips on how to use the jsobf command line program effectively.
(more…)

Bookmark this!
[Bloglines] [del.icio.us] [Digg] [Facebook] [Furl] [Google] [Newsvine] [StumbleUpon] [Technorati] [Yahoo!]

jsfmt and jsobf available for download

Sunday, September 7th, 2008

By popular request I have made my JavaScript minimizer and obfuscator available for download. The jsobf program strips JavaScript source code down to the minimum whitespace required to separate the tokens, and performs automatic semicolon insertion to completely irradiate the need for line breaks. It also offers some obfuscation by renaming identifiers. (more…)

Bookmark this!
[Bloglines] [del.icio.us] [Digg] [Facebook] [Furl] [Google] [Newsvine] [StumbleUpon] [Technorati] [Yahoo!]

ActionScript Emptiness

Saturday, August 2nd, 2008

I'm a great believer that if you're going to be good at something you should understand it a the lowest level possible. Every ActionScript developer I talk to at the moment is migrating to AS3 and mostly we talk about all the high level differences it has with AS2; the API, the event mechanism and so forth. But let's not forget the little things. It's often complacency toward the smallest components that cause the most trouble. It seems like an odd situation to know how to flip a cube around in 3D space, but not really know the difference between null and undefined. This is a real situation though, and it means bugs deep down in complex code just waiting to ruin our lives. (more…)

Bookmark this!
[Bloglines] [del.icio.us] [Digg] [Facebook] [Furl] [Google] [Newsvine] [StumbleUpon] [Technorati] [Yahoo!]

Job board spam

Thursday, July 3rd, 2008

I do marvel at the ingenuity of spammers sometimes. Despite being crap programmers, they do have a knack for coming up with new ways to deliver their poisonous junk. It's almost enough to make me consider life of crime.

After placing a job advert on Gumtree, we (my current employer and I) received a touching email from someone intersted in our junior developer role. Clicking their portfolio link took us to a spammer's "search" portal complete with gambling site pop-ups.

Bookmark this!
[Bloglines] [del.icio.us] [Digg] [Facebook] [Furl] [Google] [Newsvine] [StumbleUpon] [Technorati] [Yahoo!]