Showing posts with label code. Show all posts
Showing posts with label code. Show all posts

Wednesday, March 9, 2011

Passing Second-Class Arguments

Before it's current incarnation, I was frustrated by my own, soon-to-be-renamed, Proxy object. [Mind you, I don't mean the upcoming E5 Proxy object.] As a function manager, Proxy offers the benefit of passing secondary execution information, to it's managed routines. (These "extra" arguments permit comprehensive forking.) As with many function managers, this well-intentioned practice wound up restricting the number of arguments allowed in managed routines, resulting in a polluted signature.



Share/Bookmark

Tuesday, December 21, 2010

Clear options in a MULTI-SELECT field without loops

If I've published anything that qualifies as a "tweet", this post does. Though I have been busy, it has been a while and I sorely miss blogging. With the holidays all around us, small posts make for published posts.

Perhaps I've never had to auto-select OPTION elements in a multi-SELECT field, but I discovered a simple method for doing so, that was worth noting.

Share/Bookmark

Sunday, September 12, 2010

Learning to Open-Source via Proxy

The Internet is a relentless, fast-paced, consumer of content, and I'm a bit of a recluse. My engagements had been brief and trifling; irc chatting, a blog comment here, a forum post there. Then, as a test use of github.com - a popular code-sharing service - I published Proxy. It was my debut in the open-source JavaScript world1, and I was determined to see it through to the end. However, in the reverse time-warp that is the Internet, I've learned that the end never comes...

Share/Bookmark

Friday, August 20, 2010

The smallest boolean in JavaScript

One of my projects has a pretty large API, with lots of methods returning boolean values. At first, I returned 1's and 0's - which are not actual booleans, but are certainly good enough (for most applications). However, for a public API, I knew they would need to return true or false... After making the edits, my file size jumped. Which is how I found the smallest boolean in JavaScript.

Share/Bookmark

Wednesday, July 14, 2010

Debug easier by naming your closures

I was profiling some code when I noticed that several routines were listed as "(?)()" in Firebug, and "JScript anonymous function" in MS's Visual Studio. This proved frustrating, as recognizing my closures were critical to evaluating my code - I couldn't tell which were performing well, let alone executing.


Share/Bookmark