September 26, 2009Simple argument defaults in JavaScript

In many other interpreted programming languages like: Python, PHP, ActionScript 3.0, etc., you can have defaults to arguments that do not get passed to functions. In the three afore mentioned languages, it's as easy as saying arg = 'default' inline in the function definition. This however is not available in the JavaScript interpreter. (It might be in ECMAScript 5, though.) But that can easily be remedied with a simple helper function.

I have met other programmers that find it ridiculous that you have to create features in JavaScript that are built into other languages. They use that to put down JavaScript and call it a terrible language. However, I think thats part of what makes JavaScript so great. JavaScript, though not as powerful in features as some other languages, offers enough flexibility and expressiveness that you can create what you feel that you are missing. Lets take a look at the problem and see how easy we can remedy it.

Read Full Article...

AddThis Social Bookmark Button Posted by Greg Ferrell at 11:52 PM. Filed under: JavaScript • (0) CommentsPermalink
September 09, 2009I Won Frank Peak’s Twitter Contest!

If you like art at all and you don't already follow Frank Peak on twitter, or visit his website, I would highly recommend it. He periodically has "Almost Daily Drawings" that are his random doodles and concept drawings. His portfolio is also very, VERY good.

Frank is a very skilled illustrator and 3D artist who recently held a contest on Twitter for people who would retweet him. I was one of the fortunate winners of the contest.

Read Full Article...

AddThis Social Bookmark Button Posted by Greg Ferrell at 02:18 AM. Filed under: News • (2) CommentsPermalink
June 05, 2009Don’t miss the Appcelerator Titanium Launch Party

On Tuesday June 9th, the Appcelerator team will be throwing a product launch party at Apple’s World Wide Developer Conference to toast the arrival of Titanium Beta. If you are going to be at the WWDC head over to Jillian’s in San Francisco between 6 and 9 p.m. where they will unveil Titanium Beta.

I wish I could be there myself, but flying out to San Fran on a Tuesday is a tall order. Check it out for yourself and be sure to go if you are there. Celebrate the arrival of Titanium Beta

Read Full Article...

AddThis Social Bookmark Button Posted by Greg Ferrell at 03:40 PM. Filed under: News • (0) CommentsPermalink
April 20, 2009Please update your RSS and ATOM feeds to the Code Blog

Please update your RSS and ATOM feeds to this site. I recently discovered a small error with my back-end code that was allowing erroneous links to appear for my RSS and ATOM feeds. These bad links will work until the end of the summer at which time I will remove them and only be updating the proper links.

Read Full Article...

AddThis Social Bookmark Button Posted by Greg Ferrell at 02:06 AM. Filed under: News • (0) CommentsPermalink
April 16, 2009Adobe AIR App: JSLint AIR

In attempts to make my JavaScript applications better, I frequently use Douglas Crockford's JavaScript verifier application JSLint. If you have never used JSLint, I would advise reviewing the background on JSLint

In order to use it more easily and efficiently on local files, I took the JSLint JS file and ported it to an Adobe AIR application for the desktop. You can import the file from your desktop or paste the code in directly. In a future edition, I will add drag and drop ability to JS files. I used jQuery UI for the app UI and plan to eventually add skin choices to the options menu base on jQuery UI default skins. The app will auto update, so you will be able to see new features as soon as I add them if you accept the updates.

Read Full Article...

AddThis Social Bookmark Button Posted by Greg Ferrell at 03:33 AM. Filed under: AIR • (0) CommentsPermalink
April 13, 2009Execution order of functions and variables in JavaScript and ActionScript.

Many newcomers to web development may not be used to how web implementations of JavaScript execute. Namely, in what order it executes. This can be the source of many errors that are difficult to pinpoint if you aren't experienced with it. I think this also affects people who are very experienced with other programming languages and fosters a lot of undeserved hate towards ActionScript and JavaScript. (It's important to note that not all implementations of JavaScript are the same, and that some may in fact defer from what is said below. This article concerns browser and Flash based ECMAScript.)

The thing to understand about JavaScript is that it isn't compiled for the most part. (This is not exactly true for ActionScript because of the introduction of classes in ActionScript 2.0, however, the runtime script remains the same. You might argue that it compiles into a *.swf file, but in reality, that is the combination of everything that has to do with the Flash file. The ActionScript still remains live.) It's good that it isn't compiled though, because this allows for much more dynamic, expressive coding.

Read Full Article...

AddThis Social Bookmark Button Posted by Greg Ferrell at 03:17 AM. Filed under: JavaScript • (0) CommentsPermalink

Page 1 of 5 pages  1 2 3 >  Last »